Skip to content

Instantly share code, notes, and snippets.

Benjamin Keating bkeating

Block or report user

Report or block bkeating

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nijicha /
Last active Aug 24, 2019
Install NVM, Node.js, Yarn via Homebrew

Install NVM, NodeJS, Yarn via Homebrew


  • Homebrew should be installed (Command line tools for Xcode are included).

Getting start

Part A: Install NVM and NodeJS

  1. Install nvm via Homebrew
gbaman /
Created Nov 1, 2017
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use to make the API call. Note the json= section.
request ='', json={'query': query}, headers=headers)
if request.status_code == 200:
LowerDeez /
Created Oct 6, 2017
Django. Admin Tabular Inline initial data
from django.utils.functional import curry
class DetailsInline(admin.TabularInline):
model = Details
formset = DetailsFormset
extra = 3
def get_formset(self, request, obj=None, **kwargs):
initial = []
if request.method == "GET":
garmjs / server.js
Last active Jan 14, 2019
Simple SSR React, React Router v4 and Helmet with express
View server.js
const express = require('express')
const React = require('react')
const ReactDOMServer = require('react-dom/server')
const ReactRouter = require('react-router')
const ServerRouter = ReactRouter.ServerRouter
const App = require('./src/App').default
const path = require('path')
const Helmet = require('react-helmet')
const compression = require('compression')
View atomstyle.less
atom-text-editor {
-webkit-font-smoothing: antialiased;
.storage.type.function.arrow, .operator {
font-family: 'FiraCode-Retina';
text-rendering: optimizeLegibility;
vertical-align: baseline;
classam /
Last active Aug 21, 2019
Automation For The People

Automation for the People

Long ago, the first time I read "The Pragmatic Programmer", I read some advice that really stuck with me.

"Don't Use Manual Procedures".

This in the chapter on Ubiquitous Automation. To summarize, they want you to automate all the things.

The trouble was that I hadn't much of an idea how to actually go

druellan / opengraph.template.html
Created Dec 29, 2015
Basic template for OpenGraph/Facebook metatags
View opengraph.template.html
<html prefix="og:">
<title>The Title</title> <!-- ˜60 chars -->
<meta name="description" content="The Description"> <!-- ˜150 chars -->
<meta property="og:title" content="The Title">
<meta property="og:description" content="The Description"> <!-- ˜300 chars -->
<meta property="og:site_name" content="Sfida Blog">
<meta property="og:locale" content="es_AR">
<meta property="og:type" content="website">
<meta property="og:url" content="">
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
natcl / org.nodered.plist
Last active Mar 15, 2019
Node-Red launchd script
View org.nodered.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN >
<plist version="1.0">
staltz /
Last active Aug 24, 2019
The introduction to Reactive Programming you've been missing
You can’t perform that action at this time.