Skip to content

Instantly share code, notes, and snippets.

@larsar
larsar / shared_folder_centos_virtualbox.txt
Created January 27, 2012 08:04
Mount shared folder on CentOS in VirtualBox
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@copernicus
copernicus / ebs_stats.py
Created February 16, 2012 14:16 — forked from beaufour/ebs_stats.py
Get CloudWatch metrics for Amazon EBS volumes
#!/usr/bin/python
#
# Get Cloudwatch metrics for the EBS volumes attached to an instance
#
import datetime
import logging
import sys
import urllib

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@yukim
yukim / metrics.md
Created June 28, 2012 18:27
Cassandra Metrics (CASSANDRA-4009)

Cassandra Metrics

ATTENTION!: This page describes new metrics(CASSANDRA-4009) planned in upcoming version 1.2, which is still under development.

Overview

Apache Cassandra version 1.1 introduced metrics using Codahale's Metrics library. The library enables easier exposure of metrics and integration with other systems. What you can get from metrics are basically the same with 1.1 but reimplemented and put them in order using Metrics library. You can still query using old JMX paths,

@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 16, 2025 07:17
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@ryin
ryin / tmux_local_install.sh
Last active October 2, 2024 14:23
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@jgeurts
jgeurts / install-graphite-ubuntu-12.04.sh
Created July 14, 2012 16:36 — forked from tkoeppen/install-graphite-ubuntu-10.04.sh
Install Graphite 0.9.10 on Ubuntu 12.04
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
sudo apt-get update
sudo apt-get upgrade
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 16, 2025 07:11
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@bobbyno
bobbyno / mit_scheme_bindings.txt
Created August 11, 2012 17:53
MIT Scheme bindings suitable for rlwrap completion
#
#!optional
#!rest
#(
#\
#\altmode
#\backnext
#\backspace
#\call
#\linefeed
@tpeng
tpeng / MinHash.java
Created August 28, 2012 09:17
A simple minhash implementation in Java.
import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;
/**
* A simple MinHash implementation inspired by https://github.com/jmhodges/minhash
*
* @author tpeng ([email protected])
*/
public class MinHash {