I hereby claim:
- I am steinfletcher on github.
- I am steinf (https://keybase.io/steinf) on keybase.
- I have a public key ASBe2QIkh72SEFeu8ItJno1R7NoHu9-hSY_LknXTOfK0hAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import * as React from 'react' | |
| import * as Redux from 'redux' | |
| import { MyReduxState } from './my-root-reducer.ts' | |
| export interface OwnProps { | |
| propFromParent: number | |
| } | |
| interface StateProps { |
| import base64 | |
| import json | |
| import optparse | |
| import os | |
| import urllib2 | |
| from subprocess import call | |
| from threading import Thread | |
| """Script to clone all GitHub repositories owned by an organisation team |
| #!/usr/bin/env bash | |
| # generate a 2048-bit RSA private key | |
| openssl genrsa -out private_tmp_key.pem 2048 | |
| # convert private Key to PKCS#8 format (so Java can read it) | |
| openssl pkcs8 -topk8 -inform PEM -in private_tmp_key.pem -out private_key.pem -nocrypt | |
| # generate a public key from the private one | |
| openssl rsa -pubout -in private_tmp_key.pem -out public_key.pem |
| alias g='git' | |
| alias gst='git status' | |
| alias gd='git diff' | |
| alias gdc='git diff --cached' | |
| alias gdt='git diff-tree --no-commit-id --name-only -r' | |
| alias gl='git pull' | |
| alias gup='git pull --rebase' | |
| alias gp='git push' | |
| alias gd='git diff' | |
| alias gdt='git difftool' |
| import Control.Exception | |
| import System.Environment (getArgs) | |
| catchAny :: IO a -> (SomeException -> IO a) -> IO a | |
| catchAny = Control.Exception.catch | |
| parseArgs :: [a] -> a | |
| parseArgs args | |
| | (length args) == 1 = head args | |
| | otherwise = error "Invalid args. \nUsage: words <file>" |
| _.mixin({ | |
| 'immutableMerge': function(src, dest) { | |
| return _.merge(_.cloneDeep(src), dest); | |
| } | |
| }); | |
| // usage | |
| var src = { | |
| a: 1, |
| #!/bin/bash | |
| # Author: Stein Fletcher <[email protected]> | |
| # Purpose: Changes the mac address for the en0 device | |
| # get the current mac address | |
| old_addr=`/sbin/ifconfig en0 | awk '/ether/ {print $2}'` | |
| # Generates a random new mac address using openssl | |
| new_addr=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'` |
| #!/usr/bin/env python | |
| import os | |
| import json | |
| class Node: | |
| def __init__(self, id, text, parent): |
| var data = { | |
| "name": "root", | |
| "contents": [ | |
| { | |
| "name": "A", | |
| "contents": [ | |
| { | |
| "name": "fileA1", | |
| "contents": [] | |
| } |