Skip to content

Instantly share code, notes, and snippets.

@taryneast
taryneast / readme.md
Last active August 29, 2015 13:57
WDI - Burning Airlines lab

Burning Airlines

#####Prerequisites:

  • Ruby
  • Rails
  • HTML
  • CSS
  • git
  • pivotal tracker
@mavame
mavame / gist:5426716
Created April 20, 2013 17:21
My interpretation of Chapter 2 from Pro JavaScript Design Patterns http://www.amazon.com/Pro-JavaScript-Design-Patterns-Object-Oriented/dp/159059908X
// Ch2 from Pro JavaScript Design Patterns
// Interfaces in JS!!
/*
interface Composite {
function add(child);
function remove(child);
function getChild(index);
}
interface FormItem {
@db
db / bulletproof-npm-workflow.md
Last active January 20, 2017 03:15
Bulletproof NPM Workflow

Bulletproof NPM Workflow

Use the Bulletproof Git Workflow, and before code review:

pre-release package

Publish a pre-release version of the package:

@martinmidtsund
martinmidtsund / heroku-deploy
Last active April 3, 2017 09:52
Script for deploying a Meteor.js application to Heroku. The script will create a new application on Heroku with the given APPNAME, and add a MongoHQ addon, with the Sandbox plan(free plan with 512 MB MongoDB). It will then deploy your Meteor.js app to heroku.
#!/bin/bash
# Deploy script for Meteor.js to Heroku
#
# Author: Martin A. Midtsund / martin@iterate.no
#
# Before running this script, you need to have these tools in your path:
# meteor - To install: $ curl https://install.meteor.com | sh
# heroku - Install Heroku toolbelt and log in to your user: https://toolbelt.heroku.com/
# git - You'll get this in the Heroku toolbelt, if you don't already have it.
#
var fs = require('fs');
var http = require('http'),
httpProxy = require('http-proxy');
httpProxy.createProxyServer(
{
target:'http://localhost:8081',
ssl: {
key: fs.readFileSync('key.pem', 'utf8'),
cert: fs.readFileSync('cert.pem', 'utf8'),
@torsten
torsten / fix-whitespace.sh
Created September 12, 2012 13:58
Pre-commit hook script for git to fix whitespace and long lines.
#!/bin/sh
# Pre-commit hook for git which removes trailing whitespace, converts tabs to spaces, and enforces a max line length.
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@brandoncurtis
brandoncurtis / venus.md
Last active January 31, 2018 13:32
Setting up the Venus testnet on Ethermint (a Tendermint EVM chain, part of the Cosmos project)

All of this is prefaced on having Go installed: https://golang.org/doc/install Go is properly installed if echo $GOPATH returns something that makes sense.

Ethermint

First, install Ethermint. Normally I'd do this:

$ go get -u -d github.com/tendermint/ethermint
$ cd $GOPATH/src/github.com/tendermint/ethermint
import collections
import random
import json
import hashlib
def hexhash(x):
return '0x' + hashlib.sha224(str(x)).hexdigest()[:6]
@desmondhume
desmondhume / map_to_query_string.ex
Created August 6, 2016 18:13
Convert elixir map to query string
defmodule URL do
def to_query(input, namespace) do
Enum.map(input, fn({key, value}) -> parse("#{namespace}[#{key}]",value)end)
|> Enum.join("&")
end
def to_query(input) do
Enum.map(input, fn({key, value}) -> parse(key,value) end)
|> Enum.join("&")
end
@DCAL12
DCAL12 / notebook_importing.py
Last active June 14, 2018 10:09 — forked from robclewley/notebook_importing.py
Module to import from ipython notebooks
"""
Module directly collated from
http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Importing%20Notebooks.html
"""
import io, os, sys, types
from IPython import get_ipython
from nbformat import read
from IPython.core.interactiveshell import InteractiveShell
def find_notebook(fullname, path=None):