Skip to content

Instantly share code, notes, and snippets.

View joeljacobson's full-sized avatar

Joel Jacobson joeljacobson

View GitHub Profile
@joeljacobson
joeljacobson / gist:4126175
Created November 21, 2012 17:21 — forked from justinholmes/gist:1524914
Play2.0 Facebook Login
object Application extends Controller {
val FBAppId = "AppIdGoesHere"
val FBAppSecret = "FBAppSecretGoesHere"
def fbLogin = Action {Redirect("https://www.facebook.com/dialog/oauth?scope=user_birthday,email,user_about_me,user_location,offline_access,publish_stream,user_education_history,user_checkins" +
"&client_id="+FBAppId+"&redirect_uri="+URLEncoder.encode("http://domainname.com/fbLogin/code","UTF-8"))}
def fbLoginCode(code:String) = Action{response =>
val ws = WS.url("https://graph.facebook.com/oauth/access_token?client_id="+FBAppId+"&redirect_uri" +
@joeljacobson
joeljacobson / kickstart
Created September 1, 2014 12:15 — forked from ludo/kickstart
lang en_US
langsupport en_US
keyboard us
timezone Etc/UTC
text
install
skipx
halt
# Ridiculous URL... I know...
### DML ###
# Keyspace Name
keyspace: stresscql
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
# Table name
@joeljacobson
joeljacobson / Bank-IoT-Example.md
Last active January 22, 2016 09:18
Banking IoT Use Case

#Use Case

A bank wants to help locate and tag all their expenses/transactions in their bank account to help them categorise their spending. The users will be able to tag any expense/transaction to allow for efficient retrieval and reporting. There will be 10 millions customers with on average 500 transactions a year. Some business customers may have up to 10,000 transactions a year. The client wants the tagged items to show up in searches in less than a second to give users a seamless experience between devices.

The client would like

  1. to understand how this can be done with DSE
  2. some latency examples of how they can search all of a users data
  3. the user to be able to filter the queries using time as well as tags e.g. show me all shopping vs luxury in the last 3 months.
  4. some assurances that peak traffic of over 10,000 writes, 4,000 reads and 1000 searches per second can be accommodated by the solution using DSE.
@joeljacobson
joeljacobson / latency.txt
Created February 17, 2016 09:33 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
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
@joeljacobson
joeljacobson / README.md
Created March 27, 2018 09:15 — forked from guenter/README.md
Demo Kubernetes on DC/OS

Setup

These instructions are for DC/OS 1.11.0 and Kubernetes package 1.0.0-1.9.3.

Service Accounts

Install the DC/OS Enterprise CLI, then create a keypair and a service account for Kubernetes. Securely store the private key in the DC/OS secrets store.