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 62D8 1415 C45F B602 08F4 4C84 C9CE CDC4 D64F CA3C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
# Based on gist.github.com/gboudreau/install-ffmpeg-amazon-linux.sh | |
# and https://trac.ffmpeg.org/wiki/CompilationGuide/Centos | |
if [ "`/usr/bin/whoami`" != "root" ]; then | |
echo "You need to execute this script as root." | |
exit 1 | |
fi | |
cat > /etc/yum.repos.d/centos.repo<<EOF |
var gMyHotKeyID = EventHotKeyID() | |
gMyHotKeyID.signature = OSType("swat".fourCharCodeValue) | |
gMyHotKeyID.id = UInt32(keyCode) | |
var eventType = EventTypeSpec() | |
eventType.eventClass = OSType(kEventClassKeyboard) | |
eventType.eventKind = OSType(kEventHotKeyPressed) | |
// Install handler. | |
InstallEventHandler(GetApplicationEventTarget(), {(nextHanlder, theEvent, userData) -> OSStatus in |
#include <iostream> | |
#include <memory> | |
#include <string> | |
#include <grpc++/grpc++.h> | |
#include "helloworld.grpc.pb.h" | |
using grpc::Server; | |
using grpc::ServerBuilder; |
from debian:wheezy | |
# Install Node.js | |
RUN apt-get update | |
RUN apt-get install -y curl | |
RUN curl -sL https://deb.nodesource.com/setup | bash - | |
RUN apt-get install -y nodejs | |
# Install hubot generator | |
RUN npm install -g yo generator-hubot |
#!/bin/bash | |
# Gets the *default* ip address only. | |
function default_ip | |
{ | |
/usr/bin/ruby -e ' | |
require "socket" | |
Socket.do_not_reverse_lookup = true |
// 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); | |
} | |
}); |
// 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) { |