Skip to content

Instantly share code, notes, and snippets.

hakanilter /
Last active Mar 16, 2018
Apache Spark - Apache Cassandra Integration

Create a new instance, edit following file

sudo vim /etc/yum.repos.d/cassandra.repo

Add Cassandra repo

name=Apache Cassandra
arya-oss /
Last active Dec 11, 2020
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
gsiaw / gist:068b24b6f81ab7248d1e
Created Feb 16, 2016
Install netatalk 3 for using Time Machine thru raspberry pi 2
View gist:068b24b6f81ab7248d1e
this is how i got my raspberry pi 2 set up to be available for backup via TimeMachine
install netatalk 3
--make the OSX recognize non AFP volumes on macbook
sudo defaults write TMShowUnsupportedNetworkVolumes 1
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active Jan 23, 2021
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
oysteinjakobsen / gist:e59cdd38a688ee8a418a
Last active Aug 7, 2019
How to get docker-compose (fig) up and running on Raspberry Pi 2
View gist:e59cdd38a688ee8a418a


I assume you already have Docker up and running on your Raspberry Pi 2. If not, see this article.

The next natural step is to install Docker Compose (formerly Fig), but there's no ARM support out of the box. This recipe will help you install Docker Compose on your Raspberry Pi 2!

The following six steps will do the trick:

  1. Get the docker-compose source code from git
subfuzion /
Last active Nov 23, 2020
General REST API HTTP Status Codes

Reference: RFC 2616 - HTTP Status Code Definitions


  • 400 BAD REQUEST: The request was invalid or cannot be otherwise served. An accompanying error message will explain further. For security reasons, requests without authentication are considered invalid and will yield this response.
  • 401 UNAUTHORIZED: The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource.
  • 403 FORBIDDEN: The request has been refused. See the accompanying message for the specific reason (most likely for exceeding rate limit).
  • 404 NOT FOUND: The URI requested is invalid or the resource requested does not exists.
  • 406 NOT ACCEPTABLE: The request specified an invalid format.
jboner / latency.txt
Last active Jan 26, 2021
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
bkimble / gist:1365005
Last active Dec 2, 2020
List local memcached keys using Ruby
View gist:1365005
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []