Skip to content

Instantly share code, notes, and snippets.

@kwcto
kwcto / mac-file-transfer-via-command-line.md
Created October 22, 2015 18:51
How to copy files / folders off a Mac from the command line (optionally using Single User Mode)
@kwcto
kwcto / app.js
Created November 17, 2016 08:28
feathers-authentication-oauth2 with Auth0
// Use passport-auth0 instead of passport-github
// from https://github.com/feathersjs/feathers-authentication-oauth2/commit/1902760035af910f830a5692bad11799d37753a9
const feathers = require('feathers');
const rest = require('feathers-rest');
const hooks = require('feathers-hooks');
const memory = require('feathers-memory');
const bodyParser = require('body-parser');
const Auth0Strategy = require('passport-auth0').Strategy;
const errorHandler = require('feathers-errors/handler');
@kwcto
kwcto / Run Script.sh
Last active February 20, 2016 23:16 — forked from mschwartz/Run Script.sh
"Run Script" for React Native automatic IP configuration
INFOPLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
echo "writing to $INFOPLIST"
PLISTCMD="Add :SERVER_IP string $(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -1)"
echo -n "$INFOPLIST" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD" || true
PLISTCMD="Set :SERVER_IP $(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -1)"
echo -n "$INFOPLIST" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD" || true
@kwcto
kwcto / OpenOfficeCheckTypeformAnswers.js
Created December 30, 2015 05:36
Score full-sentence answers from Typeform for similarity against a provided answer key with OpenOffice (Javascript macro)
// See https://gist.github.com/kwcto/3cd3009b8cc12525669b to grade a simpler single-column set of answer rows
//
// Instructions for running Macros:
// https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Using_the_Scripting_Framework
//
// Check OpenOffice speadsheet text cells for similarity to a provided set of answers
// Will Sahatdjian - 12-29-2015
//
// Based on original work by:
// Copyleft 2010 by Kas Thomas
@kwcto
kwcto / OpenOfficeCheckAnswers.js
Last active December 30, 2015 05:06
Macro to "grade" a set of text answers in a spreadsheet
// https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Using_the_Scripting_Framework
//
// Check OpenOffice speadsheet text cells for similarity to a provided set of answers
// Will Sahatdjian - 12-29-2015
//
// Based on original work by:
// Copyleft 2010 by Kas Thomas
// http://asserttrue.blogspot.com/
// !!! CHANGE THESE PARAMETERS !!!!
@kwcto
kwcto / random-advice.md
Created November 24, 2015 05:30
One path to learn programming as a beginner - Web development using HTML/CSS with Javascript and Node.js

Why Javascript?

What about C++, PHP, Ruby, C#, Java, etc?

There are tons of languages, frameworks and tools to choose from but Javascript has some amazing benefits.

In my humble opinion, this path is a way to get programming basics down quickly while learning a commercially viable skillset that will be in demand in the foreseeable future.

@kwcto
kwcto / keybase.md
Created January 21, 2015 21:01
Keybase.md

Keybase proof

I hereby claim:

  • I am kwcto on github.
  • I am kwcto (https://keybase.io/kwcto) on keybase.
  • I have a public key whose fingerprint is FEEC B64D 9C73 5068 E71D B1CA 7089 C10A B279 B774

To claim this, I am signing this object:

@kwcto
kwcto / config.cson
Created May 23, 2014 02:54
Atom.io config.cson for dealing with CoffeeScript significant whitespace
'editor':
'tabLength': 2
'softTabs': false
'showInvisibles': true
'invisibles':
'cr': ''
'eol': ''
'space': '·'
'tab': ''
'fontSize': 13