Skip to content

Instantly share code, notes, and snippets.

View jameyquinn's full-sized avatar

James E Quinn IV jameyquinn

View GitHub Profile
@jameyquinn
jameyquinn / NTP redirects
Last active February 12, 2026 20:21
Redirect external NTP requests to Homelab
# NTP Server DNS Redirect List for AdGuard Home
#
# Purpose: Redirect all common NTP time server domains to your local NTP server
# Usage: Add as custom filter list in AdGuard Home (Filters → Custom filtering rules)
# Or host on GitHub Gist and add as URL-based filter
#
# Replace 10.0.10.1 with your local NTP server IP
#
# Last updated: 2025-02-12
#
/**
* Fisher-Yates in-place sort
* @param {Array} primitive items.
*/
const shuffle = a => {
for (let i = a.length - 1; i > 0; i--) {
const j = Math.floor(
Math.random() * (i + 1)
);
[a[i], a[j]] = [a[j], a[i]];
@jameyquinn
jameyquinn / gist:20eb39f4e3bf3b086536332b7a6a9386
Created October 2, 2018 14:09
dazn/help-etl local environment
// run-local copies envars and applies locally
./scripts/run-local
export ELASTICSEARCH_HOST=localhost:9200
export S3_BUCKET_NAME=test-bucket-help-api-suggest
export ENVIRONMENT=dev
export AWS_REGION=eu-central-1
// export AWS_PROFILE=dazndev
@jameyquinn
jameyquinn / running-locally.md
Created October 2, 2018 13:58
dazn/help-etl kibana

kibana

useful for checking query results

install kibana

curl -O https://artifacts.elastic.co/downloads/kibana/kibana-6.2.4-darwin-x86_64.tar.gz
shasum -a 512 kibana-6.2.4-darwin-x86_64.tar.gz 
tar -xzf kibana-6.2.4-darwin-x86_64.tar.gz
cd kibana-6.2.4-darwin-x86_64/
import mapboxgl from 'mapbox-gl';
// FRAGILE: webpack failure to import css into javascript without explicit reference
import '../node_modules/mapbox-gl/dist/mapbox-gl.css';
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import '../node_modules/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css';
const debounce = require("debounce");
// see webpack plugin for the R prefix while treeshaking
import R, {
compose,
contains,
@jameyquinn
jameyquinn / deps.txt
Last active August 29, 2015 14:02
9 module dependency tree
_base.js (Model:Filter)
Model:Base
Base
dependencies: [
Sync
Base
Cache
Base
util
]
@jameyquinn
jameyquinn / .gitconfig
Created June 4, 2014 02:26
git config global
[core]
excludesfile = /Users/jquinn/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[alias]
st = status
html{
background-color:grey;
}
.sample{
width:75px;
height:28px;
background-color:black;
padding:40px;
border: 15px solid white;
@jameyquinn
jameyquinn / Grunt test work
Last active August 29, 2015 14:02
Grunt test work
//create a test module for app js files missing corresponding test modules
grunt test-backfill --spec-dir=tests/specs
//output backfill log, but don't write new files
grunt test-backfill --no-write
//run the spec.js
grunt test --verbose
//test the spec javascript
@jameyquinn
jameyquinn / gist:8e2523b341e8d7eb70ec
Created May 15, 2014 18:45
j/locations/ia8wv5x2ZHmc6t2ap9KuGpd
{
has_photo: false,
sub_locations: [],
hotel_count: 1,
img_name: null,
region_name: "Tolima",
name: "Ibagué",
avg_rate: 0,
geometry: {
coordinates: [