Skip to content

Instantly share code, notes, and snippets.

View davidrleonard's full-sized avatar

David Leonard davidrleonard

View GitHub Profile
@dahlbyk
dahlbyk / projects.graphql
Created September 15, 2016 00:09
GraphQL to fetch GitHub Projects+Columns+Cards with issue/PR detail for a specific repo.
{
search(type: REPOSITORY, query: "org:huboard-testing spooky-octo-pug", first: 1) {
edges {
node {
__typename
... on Repository {
owner {
id
}
name
@prplmark
prplmark / gulpfile.js
Last active August 16, 2021 22:40
Gulpfile with Webpack and SCSS watch
// Essentials
var gulp = require('gulp');
var webpack = require('webpack'); // Include webpack to add definePlugin
var webpackStream = require('webpack-stream'); // Use webpack-stream to compile
// Sass Requires
var sass = require('gulp-sass'); // Include SASS
var autoprefix = require('gulp-autoprefixer'); // Autoprefixer (always)
var rename = require('gulp-rename'); // Gulp Rename
var sourcemaps = require('gulp-sourcemaps'); // Sourcemaps (for sass)
@partofthething
partofthething / configuration.yaml
Last active April 29, 2020 13:50
Home-assistant configuration with some z-wave devices, HUE lights, some custom commands, weather, etc.
homeassistant:
# Name of the location where Home Assistant is running
name: [redacted]
# Location required to calculate the time the sun rises and sets
latitude: [redacted]
longitude: [redacted]
# C for Celcius, F for Fahrenheit
temperature_unit: C
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/Los_Angeles
@eduwass
eduwass / setup.sh
Last active January 3, 2020 18:27
Flynn Install : Single node ( for Ubuntu 14.04 x64 @ DigitalOcean droplet )
#!/bin/bash
# This script will automatically set up a single node Flynn Cluster on your linux box
# Fresh Flynn install with domain provided by the xip.io service
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet
# @date 16 Nov 2015
# @author Edu Wass (eduwass at gmail com)
echo '---- START SETUP ----'
@fouad
fouad / cloudflare.json
Created October 12, 2015 06:42
Purge CloudFlare cache on deploy
{
"email": "me@email.com",
"zone": "CLOUDFLARE_ZONE",
"token": "CLOUDFLARE_TOKEN"
}
anonymous
anonymous / contentblocks.rb
Created March 21, 2015 23:29
Gives you a mechanism in Jekyll to pass content up from pages into their parent layouts. It's kind of like having Rails' content_for available for Jekyll.
# Plugin: jekyll-contentblocks
# Author: Rusty Geldmacher
# Git: https://github.com/rustygeldmacher/jekyll-contentblocks
# Instructions: https://github.com/rustygeldmacher/jekyll-contentblocks#usage
module Jekyll
module ContentBlocks
VERSION = "0.0.3"
module Common
def get_content_block_name(tag_name, block_name)
block_name = (block_name || '').strip
@filipbec
filipbec / gist:5998034874b119fab0e4
Created September 5, 2014 12:31
Scannr - Keys for obtaining US Driver's license data
@six8
six8 / gist:1732686
Created February 3, 2012 21:20
Javascript dependency graph resolution
// Dependency resolution, adapted from https://gist.github.com/1232505/f16308bc14966c8d003c2686b1c258ec41303c1f
function resolve(graph) {
var sorted = [], // sorted list of IDs ( returned value )
visited = {}; // hash: id of already visited node => true
// 2. topological sort
Object.keys(graph).forEach(function visit(name, ancestors) {
if (!Array.isArray(ancestors)) ancestors = [];
ancestors.push(name);
visited[name] = true;