Skip to content

Instantly share code, notes, and snippets.

Ben Ritchie haveaguess

Block or report user

Report or block haveaguess

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rmoff /
Last active Jul 18, 2019
cx_Oracle install on MacOS
  1. Download Instant Client:
  1. Unzip and move to /opt

  2. Create symlink

staltz /
Last active Oct 16, 2019
The introduction to Reactive Programming you've been missing
esfand / typescript_angular.adoc
Last active Feb 16, 2019
AngularJS with TypeScript
View typescript_angular.adoc
lrvick / angular-logging.js
Last active Mar 4, 2016
AngularJS - Global logging override module. Enables you to write custom hooks to intercept, display, manipulate or re-transfer $log logs as you see fit. Also allows one to easily globally disable logs application wide, useful for production.
View angular-logging.js
* # Global logging module
* This is a global set of hooks that catch all $log messages sent out by the
* application. Currently they are simply passed off directly to console.log
* but this could be updated later to allow them to be stored locally, sent to
* a server etc.
angular.module('ngLogging', [])
eyecatchup / how-to-install.txt
Last active Jan 22, 2018
Instructions how to install (and run) "Leapcast" on Windows.
View how-to-install.txt
1. Download
2. Extract zip to C:\leapcast
3.1 Download Python 2.7:
3.2 Install Python to C:\Python27
NOTE: If you have a newer version, install 2.7.5 and edit the environment variable and change for example "C:\Python33" to "C:\Python27".
4.1 Download Setuptools here:
View affiliate.js
var hzAdDebug = !1,
hzVersion = "4.11",
keywords, adCont, urlPrefix = "https:" == location.protocol ? "" : "";
function addAffiliateLinks() {
try {
if (0 !="")) {
var a = {
com: "-20",
fr: "-21",
vmarquez / BombGameNoActors.scala
Created Oct 5, 2012
This is a simple 'mulit-player, concurrent' game that attempts to reduce the number of mutable variables to a minimum.
View BombGameNoActors.scala
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.CountDownLatch
import akka.dispatch.Future
import akka.dispatch.Promise
import scala.collection.JavaConversions._
import scala.collection.JavaConversions
import akka.dispatch.ExecutionContext
import java.util.concurrent.Executors
import java.util.concurrent.atomic.AtomicReference
jboner / latency.txt
Last active Oct 15, 2019
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
BYK / GHAPILanguageStats.js
Created Jul 11, 2011
Get language stats of your GitHub
View GHAPILanguageStats.js
window.getLangStats = function getLangStats(repos) {
var mapper = function(ent){return ent.language},
reducer = function(stats, lang) {stats[lang] = (stats[lang] || 0) + 1; return stats},
langStats =, {});
delete langStats['null'];
return Object.keys(langStats).sort(function(a,b){return langStats[b] - langStats[a]});
window.ghApiCallHandler = function(result) {
if (Math.floor(result.meta.status/100) == 2)
cjus /
Created Jun 26, 2011
Extract a JSON value from a BASH script
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
json=`curl -s -X GET$1.json`
You can’t perform that action at this time.