Skip to content

Instantly share code, notes, and snippets.

@jonlong
jonlong / archive-and-restore-from-github.md
Created August 12, 2013 15:01
Archive/Restore Git Repos to/from GitHub

Archive a GitHub Repository

git clone --bare git@github.com:jonlong/<repo>.git
tar -czf <repo>.git.tar.gz <repo>.git

Deploy an Archived Repository to GitHub

Create a new private repository on the target account:

curl -F 'login=' -F 'token=' -F 'name=jonlong/' -F 'public=0' http://github.com/api/v2/json/repos/create

@jonlong
jonlong / raspi-wifi-config.md
Last active December 29, 2015 02:59
Configuring Raspberry Pi WiFi settings from the command line

Useful for when you're setting up a new wifi-enabled RPi without an external monitor/keyboard. The best way to do this is by using a TTY to Serial Cable, per the instructions here: http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/

Note that this only works for non-hidden networks.

  sudo nano /etc/network/interfaces

For regular networks, replace whatever's in there with this:

@jonlong
jonlong / gulp-cdn-manifest-task.md
Last active August 29, 2015 14:05
Gulp CDN/Manifest task
var gulp = require('gulp');
var revall = require('gulp-rev-all');
var awspublish = require('gulp-awspublish');
var cloudfront = require('gulp-cloudfront');
var jsoneditor = require('gulp-json-editor');
var secrets = require('../../config/secrets');
var config = require('../../config/app');
var handleErrors = require('../util/handleErrors');
@jonlong
jonlong / README.md
Created December 17, 2014 16:45
SVG Sprite approach

Gulp Task

  • Copies individual SVGs to assets folder (in case you need to reference them in CSS)
  • Creates a sprite sheet called icons.svg and gives each sprite an ID based on its filename.
  • Cuts all individual SVGs into fallback PNGs, which are auto-loaded in IE by svg4everybody.

HTML

  • conditionally loads svg4everybody for IE, and uses svg sprite notation to use a spritesheet of SVG images.
@jonlong
jonlong / cloudflare-purge-post-receive
Last active May 16, 2022 05:30
Purge CloudFlare when deploying GitHub Pages: post-receive hook
#!/bin/sh
#
# Purge the CloudFlare cache after pushing an update to GitHub Pages
#
# To use, rename this file to "post-receive" and drop it into the `.git/hooks/` directory in your project's root.
# Change the $branch value based on the type of page you're deploying.
# Use "master" for Organization Pages, and "gh-pages" for Project Pages.
#
# Find your CloudFlare API token here: https://www.cloudflare.com/a/account/my-account
@jonlong
jonlong / psa.js
Last active September 2, 2015 16:43
How to Use ES2015 with Node.js, For Regulars
/**
* ES6 looks awesome! Hey, and Node 0.12 supports a ton of features!
*
* ::HOURS LATER::
*
* In strict mode only!
*
* ::HOURS LATER::
*
* The docs say modules are supported! Let's convert everything now!
@jonlong
jonlong / lw3-ad.md
Last active October 16, 2015 17:20
LW3 ad

Hey all,

Gonna put my Lethal Weapon 3 up for sale and figured I'd put the word out to the group before posting on Craigslist/Pinside. Super fun game, killer theme, great callouts ("diplomatic immunity...is OVER!").

For anyone looking for a first game, I'd highly recommend it. The factory settings are perfectly for getting new players hooked, and you can jack up the incline and pull the outlane posts for something fast and brutal. Same layout as T2.

Solidly in "player's condition" territory, and ready to rock if you just want to fire it up and flip. Also an ideal starting point if you're interested in learning how to maintain and fix up a machine.

Was routed in its previous life, and I bought it from a guy who'd gotten it in a package deal but had an LW3 already. The cabinet's seen better days, but the playfield is in solid shape, and the DMD's error-free. Corey and I scrubbed about a decade's worth of bar grime off of everything, cleaned up the playfield, replaced balls and rubbers, and then played the

import React, {
Alert,
Component,
StyleSheet,
Text,
View,
TextInput,
PropTypes,
addons
} from 'react-native';

Keybase proof

I hereby claim:

  • I am jonlong on github.
  • I am jonlong (https://keybase.io/jonlong) on keybase.
  • I have a public key whose fingerprint is 67B7 E3BC 9700 C58C 38A5 8EE4 E24E 0BCE 07F3 F4FA

To claim this, I am signing this object:

04e79bc27f16bcc5ca17b8c8a36eb4a8c8fc26f66c3e0cd4d81d589df26e8e70b55d0425b81002d28268fef2fa73b1069187f46bd6c2e8071217bb1be9d707f9f0