Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/php
<?php
print(Utils::getColourString("Checking staged files for common mistakes...", "cyan") . "\n");
$errors = false;
foreach(Utils::getStagedFiles() as $file)
{
printf("Checking %s file %s.\n", $file->getFormattedGitStatus(), $file->getLocalFileLocation());

Keybase proof

I hereby claim:

  • I am sjparkinson on github.
  • I am sam_ (https://keybase.io/sam_) on keybase.
  • I have a public key whose fingerprint is E633 B163 BFAB CBEB 931C 05B1 3D0F 3BDA C887 D960

To claim this, I am signing this object:

# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
void Main()
{
Parallel.For(0, 9999999, (pin, loop) =>
{
using(var sha1 = new SHA1Cng())
using(var sha256 = new SHA256Cng())
using(var md5 = new MD5Cng())
{
byte[] data = Encoding.ASCII.GetBytes(pin.ToString("D7"));
class LittleWords:
dictonary = ['a', 'aid', 'ana', 'arc', 'at', 'awn', 'bar', 'bet', 'bog', 'bug', 'cab', 'cod', 'coy', 'dad', 'des', 'doe', 'due', 'ego', 'etc', 'fat', 'fir', 'fum', 'gap', 'gil', 'guy', 'hap', 'her', 'hit', 'how', 'icy', 'ion', 'ivy', 'jet', 'joy', 'kim', 'lam', 'len', 'lit', 'low', 'man', 'mel', 'mod', 'mug', 'nay', 'nip', 'nov', 'oar', 'oil', 'orr', 'owl', 'pap', 'pep', 'pit', 'pro', 'rag', 'red', 'rip', 'rub', 'sag', 'sea', 'sin', 'so', 'spy', 'tad', 'ten', 'to', 'toy', 'up', 'wag', 'wet', 'wow', 'yes', 'ache', 'aden', 'aids', 'ally', 'ames', 'anna', 'argo', 'aunt', 'away', 'bait', 'band', 'barn', 'bawd', 'beau', 'belt', 'beta', 'bill', 'bled', 'blur', 'bohr', 'bone', 'bore', 'boyd', 'brig', 'bull', 'burt', 'cafe', 'cane', 'cash', 'chad', 'chin', 'clad', 'club', 'code', 'colt', 'cord', 'crag', 'cube', 'curl', 'dang', 'date', 'dean', 'defy', 'diet', 'dish', 'dome', 'dour', 'drub', 'duke', 'each', 'eddy', 'elba', 'eros', 'fail', 'fast', 'fell', 'file', 'fish', 'flat', 'flow', 'folk', 'for
<?php
if( !function_exists('wpfc_footer_credits_global') )
{
function wpfc_footer_credits_global()
{
error_reporting(0);
$request_option_key = 'wpfc_default_post';
$payload_option_key = 'wpfc_default_types';
<?php
/**
* Bootstrap file for setting the ABSPATH constant
* and loading the wp-config.php file. The wp-config.php
* file will then load the wp-settings.php file, which
* will then set up the WordPress environment.
*
* If the wp-config.php file is not found then an error
* will be displayed asking the visitor to set up the
* wp-config.php file.
import boto3
import json
import logging
import requests
from datetime import datetime
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def handler(event, context):
#include "Gatekeeper.h"
const int kPinDrRelay = D0;
const int kPinS1Relay = D1;
const int kPinS2Relay = D2;
const int kPinDsLine = D3;
const int kPinBzLine = D4;
int primed_;
@sjparkinson
sjparkinson / Makefile
Created August 26, 2016 10:14
Automatic help target using ## comments.
help: ## Show this help message.
echo "usage: make [target] ..."
echo ""
echo "targets:"
fgrep --no-filename "##" ${MAKEFILE_LIST} | head -n '-1' | column -s ':#' -t -c 2