Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am anothernoise on github.
  • I am anothernoise (https://keybase.io/anothernoise) on keybase.
  • I have a public key ASD4eieYxAWc2uvwHKzDKxtoj87PhdSiazHrCVoWqS95bgo

To claim this, I am signing this object:

#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="old_email@mail.com"
CORRECT_NAME="user"
CORRECT_EMAIL="your@mail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
@anothernoise
anothernoise / aws_ec2_root.md
Created February 5, 2016 15:13 — forked from tracend/aws_ec2_root.md
AWS EC2: Steps to enable root access with your local key - Inspired by: https://forums.aws.amazon.com/thread.jspa?threadID=86876

Note: replace {{server}} with your domain or ip

  • Login as the ec2-user
ssh -i key.pem ec2-user@{{server}}
  • Switch to administrator
sudo -i
@anothernoise
anothernoise / latency.txt
Created January 25, 2016 17:57 — 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
@anothernoise
anothernoise / Spark+ipython_on_MacOS.md
Created October 22, 2015 11:44 — forked from ololobus/Spark+ipython_on_MacOS.md
Apache Spark installation + ipython notebook integration guide for Mac OS X

Apache Spark installation + ipython notebook integration guide for Mac OS X

Tested with Apache Spark 1.3.1, Python 2.7.9 and Java 1.8.0_45

Install Java Development Kit

Download and install it from oracle.com

@anothernoise
anothernoise / build.sbt
Created October 13, 2015 08:58 — forked from travisbrown/build.sbt
Simple example of how to use Dispatch to access the Chronicling America API asynchronously.
scalaVersion := "2.10.2"
libraryDependencies ++= Seq(
"net.databinder.dispatch" %% "dispatch-core" % "0.11.0",
"net.databinder.dispatch" %% "dispatch-json4s-jackson" % "0.11.0",
"net.sf.opencsv" % "opencsv" % "2.0"
)
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation template to deploy jenkins/nginx.",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String",
import pymongo
from pymongo import Connection
from pymongo.dbref import DBRef
from pymongo.database import Database
# connect
connection = Connection()
db = Database(connection, "things")
# clean up
-- This property controls whether full project paths (including parent folders) are displayed
property includeFullProjectPaths : true
-- These properties control whether additional task content is displayed
property includeTaskContext : true
property includeTaskEstimatedTime : true
property includeTaskStartDate : true
property includeTaskModificationDate : true
property includeTaskCompletionDate : true
property includeTaskNotes : true