Skip to content

Instantly share code, notes, and snippets.


Oliver Hookins ohookins

View GitHub Profile
View gist:202c0921527ddceb3e32a90abe0333fe
### Keybase proof
I hereby claim:
* I am ohookins on github.
* I am ohookins ( on keybase.
* I have a public key ASCQ9bVvn9EtLqoTZY5MtwX_-J3kVWBlbrnNfnyben8AzQo
To claim this, I am signing this object:
ohookins / main.go
Created Jun 25, 2018
Simple Go-based HTTP health smoke test server
View main.go
package main
import (
View base36.go
package main
import (
const (
idLength = 12
lookupString = "0123456789abcdefghijklmnopqrstuvwxyz"
ohookins / gist:ac4ce3f7ee964fbb7982c5b36d80a0fb
Created Mar 12, 2018
Edges-only shader for cube-like things
View gist:ac4ce3f7ee964fbb7982c5b36d80a0fb
Shader "Custom/EdgesOnly"
_EdgeColor ("Edge Color", Color) = (1,1,1,1)
_EdgeWidth ("Edge Width", Range(0, 0.3)) = 0.1
View gist:0bebf6db0754ae430467d1de6feafa66
Undefined symbols for architecture x86_64:
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const", referenced from:
cpr::Session::Impl::makeRequest(void*) in libcpr.a(session.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(unsigned long, unsigned long, char const*, unsigned long) const", referenced from:
cpr::util::parseHeader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libcpr.a(util.cpp.o)
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
void std::__1::vector<curl_forms, std::__1::allocator<curl_forms> >::__push_back_slow_path<curl_forms>(curl_forms&&) in libcpr.a(session.cpp.o)
void std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1
View gist:3567bbb86b1a0bd9c4a0
# Git completions
source /Applications/
source /Applications/
# Show git branch name in prompt
function smiley() {
if [ $? -eq 0 ]; then
echo -en '\033[32m:)\033[00m'
echo -en '\033[31m:(\033[00m'
ohookins / gist:37e8dc49e12ffd71742d
Created Sep 7, 2014
Failed attempt at automatically adjusting content surface
View gist:37e8dc49e12ffd71742d
// Constructor function for our ContentView class
function ContentView() {
// Applies View's constructor function to ContentView class
View.apply(this, arguments);
var content = TextData['mycontent'];
// Backgrounds
this.add(new Surface({
size: [undefined, undefined],
ohookins / SlideView.js
Last active Aug 29, 2015 slideshow with fade-in/slide/fade-out on each slide
View SlideView.js
/*** SlideView ***/
// define this module in Require.JS
define(function(require, exports, module) {
// Import additional modules to be used in this view
var View = require('famous/core/View');
var ImageSurface = require('famous/surfaces/ImageSurface');
var Transform = require('famous/core/Transform');
var Modifier = require('famous/core/Modifier');
ohookins / presto-bootstrap.rb
Created Jun 7, 2014
Working PrestoDB bootstrap script on top of EMR
View presto-bootstrap.rb
require 'json'
require 'emr/common'
require 'digest'
require 'optparse'
def println(*args)
print *args
View gist:7545074
require 'data_mapper'
require './models/user'
require './models/post'
require './models/comment'
module Seed
extend self
def run
User.create(:firstname => "John", :lastname => "Smith", :username => "johnsmith")