Skip to content

Instantly share code, notes, and snippets.

View JFKingsley's full-sized avatar

Jonathan JFKingsley

View GitHub Profile
@JFKingsley
JFKingsley / status
Created October 21, 2014 09:32
OSX Status
#!/bin/bash
# Gets the *default* ip address only.
function default_ip
{
/usr/bin/ruby -e '
require "socket"
Socket.do_not_reverse_lookup = true
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
#include <iostream>
#include <memory>
#include <string>
#include <grpc++/grpc++.h>
#include "helloworld.grpc.pb.h"
using grpc::Server;
using grpc::ServerBuilder;
@JFKingsley
JFKingsley / test.swift
Created October 20, 2016 11:18
Global hotkey registration
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
#!/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

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 62D8 1415 C45F B602 08F4 4C84 C9CE CDC4 D64F CA3C

To claim this, I am signing this object: