Skip to content

Instantly share code, notes, and snippets.

View nickpreston24's full-sized avatar
🏠
Working remote

Nicholas Preston nickpreston24

🏠
Working remote
View GitHub Profile
@nickpreston24
nickpreston24 / index.html
Created May 5, 2025 19:37 — forked from neisdev/index.html
Kanban Board with TailwindCSS and AlpineJS
<body class="antialiased sans-serif bg-gray-300">
<!-- Alert Box -->
<div class="fixed w-full z-50 flex inset-0 items-start justify-center pointer-events-none md:mt-5" x-data="{
message: '',
showFlashMessage(event) {
this.message = event.detail.message;
setTimeout(() => this.message = '', 3000)
}
}">
<template x-on:flash.window="showFlashMessage(event)"></template>
@nickpreston24
nickpreston24 / docker-compose-base-setup.yaml
Created August 9, 2024 13:17 — forked from fabean/docker-compose-base-setup.yaml
Docker-compose for tutorial blog post
version: '2'
services:
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy:alpine
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
@nickpreston24
nickpreston24 / ObjectToDictionaryHelper.cs
Created April 25, 2024 01:14 — forked from jarrettmeyer/ObjectToDictionaryHelper.cs
C# convert an object to a dictionary of its properties
public static class ObjectToDictionaryHelper
{
public static IDictionary<string, object> ToDictionary(this object source)
{
return source.ToDictionary<object>();
}
public static IDictionary<string, T> ToDictionary<T>(this object source)
{
if (source == null)
@nickpreston24
nickpreston24 / curl.sh
Created March 31, 2024 14:21 — forked from FylmTM/curl.sh
Neo4j curl call example
#!/bin/bash
QUERY=query.json
time curl -i -XPOST \
-o output.log \
--data "@$QUERY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
http://127.0.0.1:7474/db/data/transaction/commit
@nickpreston24
nickpreston24 / GetSellers.sql
Created January 19, 2023 02:33 — forked from rflechner/GetSellers.sql
How to store SQL files in assembly and execute them in C#
-- this file Embedded resource
SELECT * FROM "Sellers"
@nickpreston24
nickpreston24 / GetSellers.sql
Created January 19, 2023 02:33 — forked from rflechner/GetSellers.sql
How to store SQL files in assembly and execute them in C#
-- this file Embedded resource
SELECT * FROM "Sellers"
@nickpreston24
nickpreston24 / daemon.js
Created July 31, 2021 16:38 — forked from kumatch/daemon.js
Node.js daemon example
var fs = require('fs');
var INTERVAL = 1000;
var cycle_stop = false;
var daemon = false;
var timer;
process.argv.forEach(function (arg) {
if (arg === '-d') daemon = true;

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@nickpreston24
nickpreston24 / FSGrep.cs
Created February 7, 2020 21:37 — forked from wcharczuk/FSGrep.cs
C# File System Grep
public class FSGrep
{
public FSGrep()
{
this.Recursive = true;
}
public String RootPath { get; set; }
public Boolean Recursive { get; set; }
public String FileSearchMask { get; set; }