Skip to content

Instantly share code, notes, and snippets.

@kwcto
kwcto / app.js
Created Nov 17, 2016
feathers-authentication-oauth2 with Auth0
View app.js
// 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 Feb 20, 2016 — forked from mschwartz/Run Script.sh
"Run Script" for React Native automatic IP configuration
View Run Script.sh
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 Dec 30, 2015
Score full-sentence answers from Typeform for similarity against a provided answer key with OpenOffice (Javascript macro)
View OpenOfficeCheckTypeformAnswers.js
// 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 Dec 30, 2015
Macro to "grade" a set of text answers in a spreadsheet
View OpenOfficeCheckAnswers.js
// 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 Nov 24, 2015
One path to learn programming as a beginner - Web development using HTML/CSS with Javascript and Node.js
View random-advice.md

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 / mac-file-transfer-via-command-line.md
Created Oct 22, 2015
How to copy files / folders off a Mac from the command line (optionally using Single User Mode)
View mac-file-transfer-via-command-line.md
View 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
Atom.io config.cson for dealing with CoffeeScript significant whitespace
View config.cson
'editor':
'tabLength': 2
'softTabs': false
'showInvisibles': true
'invisibles':
'cr': ''
'eol': ''
'space': '·'
'tab': ''
'fontSize': 13