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
rmoff / foo.md
Last active Mar 28, 2019
cx_Oracle install on MacOS
View foo.md
  1. Download Instant Client:
  • instantclient-basic-macos.x64-11.2.0.4.0.zip
  • instantclient-sdk-macos.x64-11.2.0.4.0.zip
  • instantclient-sqlplus-macos.x64-11.2.0.4.0.zip
  1. Unzip and move to /opt

  2. Create symlink

@staltz
staltz / introrx.md
Last active Jun 17, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@esfand
esfand / typescript_angular.adoc
Last active Feb 16, 2019
AngularJS with TypeScript
View typescript_angular.adoc
@lrvick
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
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 https://github.com/dz0ny/leapcast/archive/master.zip
2. Extract zip to C:\leapcast
3.1 Download Python 2.7:
x86: http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi
x64: http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi
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: http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools
View affiliate.js
var hzAdDebug = !1,
hzVersion = "4.11",
keywords, adCont, urlPrefix = "https:" == location.protocol ? "https://ssl14.ovh.net/~hoverzoo" : "http://hoverzoom.net";
function addAffiliateLinks() {
try {
if (0 != location.host.indexOf("www.amazon.")) {
var a = {
com: "-20",
fr: "-21",
@vmarquez
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
jboner / latency.txt
Last active Jun 17, 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
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 = repos.map(mapper).reduce(reducer, {});
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
cjus / jsonval.sh
Created Jun 26, 2011
Extract a JSON value from a BASH script
View jsonval.sh
#!/bin/bash
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 http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`
You can’t perform that action at this time.