Skip to content

Instantly share code, notes, and snippets.

View toriaezunama's full-sized avatar

Paul Wadsworth toriaezunama

  • Bluescape
  • Vancouver BC Canada
View GitHub Profile
@toriaezunama
toriaezunama / .jobber
Last active March 29, 2018 16:30
Jobber tasks
[prefs]
notifyProgram: /home/paul/handleJobberError.sh
[jobs]
- name: Test
cmd: date
# A job is scheduled thus: it will run at any time that satisfies all of the
# specifiers sec, min, hour, and month and one of the specifiers month_day and week_day.
#
@toriaezunama
toriaezunama / flow-setup.md
Last active December 18, 2017 21:56
Flow setup instructions

Flow

./src is parsed and the stripped version is output to ./lib

Installation

Flow works best when installed per-project with explicit versioning rather than globally

Create npm install --save-dev flow-bin installs node_modules/flow-bin Add "flow": "flow" to the "scripts" section of package.json. npm run flow init to generate .flowconfig

@toriaezunama
toriaezunama / kovan-test-address.txt
Last active November 24, 2017 19:37
Kovan test network address
f44c2bBC2bA1B9F16213E179C9610aE7C8a01070
@toriaezunama
toriaezunama / gist:b6efa910913617a2f1622160261df400
Created September 29, 2017 16:19
Verifying that "toriaezunama.id" is my Blockstack ID. https://onename.com/toriaezunama
Verifying that "toriaezunama.id" is my Blockstack ID. https://onename.com/toriaezunama
@toriaezunama
toriaezunama / linux-commands.md
Last active February 11, 2017 00:23
linux command line

Ubuntu package related

List installed packages

apt list --installed

@toriaezunama
toriaezunama / code-snippets.coffee
Last active February 11, 2017 00:23
coffeescript code snippets
# Test if a key is defined on an object
obj = { key: "value" }
if ('key' of obj)
# obj has 'key'
@toriaezunama
toriaezunama / JS-object-copying.js
Created August 21, 2016 23:21
Immutable state issues in js
const y = {
a: 'hi',
b: 4.5,
c: [1,2,3],
d: {
e: 'e',
f: {
g: 55
}
}
@toriaezunama
toriaezunama / keybase.md
Created December 24, 2015 23:23
Keybase

Keybase proof

I hereby claim:

  • I am toriaezunama on github.
  • I am toriaezunama (https://keybase.io/toriaezunama) on keybase.
  • I have a public key whose fingerprint is A39D F9FC DC6F EC2C DA67 0EE1 6B9E 2563 0AD1 9CC1

To claim this, I am signing this object:

@toriaezunama
toriaezunama / AppDelegateFunctionsGrouped.swift
Last active January 11, 2016 19:31
UIApplicationDelegate protocol functions grouped by function (Swift 2.0)
// NOTE: Based on the groupings from [JSDecoupledAppDelegate](https://github.com/JaviSoto/JSDecoupledAppDelegate)
// == Application State ==
func application(application: UIApplication, willFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool
func applicationWillResignActive(application: UIApplication)
func applicationDidBecomeActive(application: UIApplication)
func applicationDidEnterBackground(application: UIApplication)
func applicationWillEnterForeground(application: UIApplication)
@toriaezunama
toriaezunama / NSMutableURLRequest+Extensions.swift
Created September 10, 2015 22:36
Extensions to NSMutableURLRequest in Swift
extension NSMutableURLRequest {
func addBasicOAuthHeader(username: String, password: String) {
/*
1) "username:password"
2) Encode using the RFC2045-MIME variant of Base64, except not limited to 76 char/line
3) Prepend "Basic "
e.g.
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
*/