Skip to content

Instantly share code, notes, and snippets.

@nieldomingo
nieldomingo / vimrc
Last active October 4, 2015 10:28
Nathaniel Domingo's vimrc
set ai
set ts=2
set sts=2
set et
set sw=2
set nu
set laststatus=2
set incsearch
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
@nieldomingo
nieldomingo / tmux.conf
Last active October 7, 2015 14:57
My tmux.conf
# Our .tmux.conf file
# Setting the prefix from C-b to C-a
# START:prefix
set -g prefix C-a
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
@nieldomingo
nieldomingo / gist:f0c7708b22cdd986171f
Created February 19, 2015 07:14
First Run in RPi Cluster, HiBench Sort
15/02/19 06:37:37 INFO mapreduce.Job: map 100% reduce 96%
15/02/19 06:37:57 INFO mapreduce.Job: map 100% reduce 97%
15/02/19 06:38:13 INFO mapreduce.Job: map 100% reduce 98%
15/02/19 06:38:31 INFO mapreduce.Job: map 100% reduce 99%
15/02/19 06:38:48 INFO mapreduce.Job: map 100% reduce 100%
15/02/19 06:38:59 INFO mapreduce.Job: Job job_1424320958758_0001 completed successfully
15/02/19 06:39:00 INFO mapreduce.Job: Counters: 53
File System Counters
FILE: Number of bytes read=11131257
FILE: Number of bytes written=181368960
@nieldomingo
nieldomingo / gist:11232f13d19870aecebf
Created September 22, 2015 16:05
source ip of weird logging
$ curl ipinfo.io/52.10.227.107
{
"ip": "52.10.227.107",
"hostname": "ec2-52-10-227-107.us-west-2.compute.amazonaws.com",
"city": "Boardman",
"region": "Oregon",
"country": "US",
"loc": "45.8399,-119.7006",
"hosting": true,
"org": "AS16509 Amazon.com, Inc.",
@nieldomingo
nieldomingo / prime_sieve.py
Created August 6, 2017 06:11
Sieve of Eratosthenes using Python Generators
def sieve():
def _sieve():
current = 2
while True:
yield current
current += 1
def _new_gen(s, current_prime):
return (n for n in s if n % current_prime != 0)
s = _sieve()