Skip to content

Instantly share code, notes, and snippets.

$ ping www.google.com.bd
PING www.google.com.bd (74.125.135.94): 56 data bytes
64 bytes from 74.125.135.94: icmp_seq=0 ttl=45 time=359.124 ms
64 bytes from 74.125.135.94: icmp_seq=1 ttl=45 time=904.636 ms
Request timeout for icmp_seq 2
64 bytes from 74.125.135.94: icmp_seq=3 ttl=45 time=674.531 ms
Request timeout for icmp_seq 4
64 bytes from 74.125.135.94: icmp_seq=5 ttl=45 time=623.437 ms
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
@necaris
necaris / latency.txt
Created May 31, 2012 13:11 — forked from jboner/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
@necaris
necaris / maven-output.txt
Created April 29, 2012 17:05
Maven Output
Downloading: http://download.java.net/maven/2/net/java/jvnet-parent/1/jvnet-parent-1.pom
[INFO] Unable to find resource 'net.java:jvnet-parent:pom:1' in repository m2.java.net (http://download.java.net/maven/2)
Downloading: http://repository.jboss.org/nexus/content/groups/public//net/java/jvnet-parent/1/jvnet-parent-1.pom
[INFO] Unable to find resource 'net.java:jvnet-parent:pom:1' in repository repository.jboss.org (http://repository.jboss.org/nexus/content/groups/public/)
Downloading: http://maven.glassfish.org/content/groups/glassfish/net/java/jvnet-parent/1/jvnet-parent-1.pom
185b downloaded (jvnet-parent-1.pom)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = '<html>
<head><title>301' - RETRYING
Downloading: http://maven.glassfish.org/content/groups/glassfish/net/java/jvnet-parent/1/jvnet-parent-1.pom
185b downloaded (jvnet-parent-1.pom)
@necaris
necaris / pycheckers
Created February 7, 2012 17:01
My collection of Python correctness-checkers
#!/bin/bash
pyflakes "$1"
pep8 --repeat "$1"
true
@necaris
necaris / ipython_config.py
Created February 7, 2012 13:53
IPython config snippet that makes it work with virtualenv
# Configuration snippet to let system-wide IPython work with virtualenvs
# Code taken from Ahmed Soliman's post at:
# (http://www.ahmedsoliman.com/2011/09/27/use-virtualenv-with-ipython-0-11/)
# Tweaked by Rami Chowdhury
from os import environ
from os.path import join, sep
from sys import version_info
if version_info[0] > 2:
# Python 3.x doesn't define this, so for convenience, we do.