Skip to content

Instantly share code, notes, and snippets.

View JFKingsley's full-sized avatar

Jonathan JFKingsley

View GitHub Profile
// Load `*.js` under current directory as properties
// i.e., `User.js` will become `exports['User']` or `exports.User`
require('fs').readdirSync(__dirname + '/').forEach(function(file) {
if (file.match(/.+\.js/g) !== null && file !== 'index.js') {
var name = file.replace('.js', '');
exports[name] = require('./' + file);
}
});
@JFKingsley
JFKingsley / 0_reuse_code.js
Created May 12, 2014 02:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.casthelloworld" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
var parent = function() {
var spawn = require('child_process').spawn;
var child = spawn(config('php_command'), ['-S', config('php_serve_url')]);
var stdout = '';
var stderr = '';
child.stdout.on('data', function(buf) {
console.log('[STR] stdout "%s"', String(buf));
stdout += buf;
});
child.stderr.on('data', function(buf) {
Not a git repository
To compare two paths outside a working tree:
usage: git diff [--no-index] <path> <path>
xcodebuild -workspace TestProject/TestProject.xcworkspace -scheme TestProject clean | xcpretty -c
/bin/sh: xcpretty: command not found
2014-03-13 02:42:44.637 xcodebuild[22580:1207] [MT] PluginLoading: Required plug-in compatibility UUID 37B30044-3B14-46BA-ABAA-F01000C27B63 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2014-03-13 02:42:44.638 xcodebuild[22580:1207] Failed to load plugin at: /Users/Jonathan/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin, skipping. Reason for failure: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
make: *** [clean] Error 127

Keybase proof

I hereby claim:

  • I am JFKingsley on github.
  • I am jk (https://keybase.io/jk) on keybase.
  • I have a public key whose fingerprint is 96CE 2594 AC56 2E0A EF87 FA17 8A6F 620E EDE8 0057

To claim this, I am signing this object: