Skip to content

Instantly share code, notes, and snippets.

View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View base58.rb
# Version 2, December 2004
# Copyright (C) 2004 Sam Hocevar
# 14 rue de Plaisance, 75014 Paris, France
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
View post-receive.rb
#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy ( and it's awesome
# - Ryan Florence (
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'
todgru / riaudit.rb
Last active Apr 6, 2016 — forked from cognusion/riaudit.rb
Simple script to audit AWS EC2 Reserved Instances vs Instances running. Please read regarding `aws-sdk` versioning and this error `uninitialized constant AWS (NameError)`.
View riaudit.rb
#!/usr/bin/env ruby
# Audits your reserved instances vs your running instances, and reports back.
# If you want to run this from an AWS instance, its IAM Role must be granted at least the following:
# "Statement": [
# {
# "Action": [
# "ec2:DescribeInstances",

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

todgru /
Created Jul 20, 2016 — forked from JadedEvan/
HOWTO configure the puppet enterprise master (v3.7) to use environment directories


This document describes how to modify the Puppet Master (Enterprise v3.7) server configuration so that it can use environments for the manifests. Using those environment files allows the puppet agents to configure themselves in a variety of environments. It allows you to create a separate set of manifests and modules for specific environments, thereby safeguarding that untested modifications to no promote to the production nodes.

Setup environment directories

$ cd /etc/puppetlabs
$ sudo mkdir environments
$ sudo clown -r puppet:root environments
todgru /
Last active Jan 26, 2017 — forked from jexchan/
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
todgru / gist:e5d3767eb4b08b2d7dfa17a9f0ca0e49
Created Mar 23, 2017 — forked from asabaylus/gist:3071099
Github Markdown Heading Anchors
View gist:e5d3767eb4b08b2d7dfa17a9f0ca0e49

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

todgru / knit.rb
Created May 5, 2017 — forked from nrser/knit.rb
knit.rb - recursively `yarn link` together all `file:<path>` deps in package.json manifests.
View knit.rb
#!/usr/bin/env ruby
# recursively `yarn link` together all `file:<path>` deps in package.json
# manifests.
# AUTHOR nrser
View BBC-Radio.m3u
#EXTINF:-1,BBC - Radio 1
#EXTINF:-1,BBC - Radio 2
#EXTINF:-1,BBC - Radio 3
#EXTINF:-1,BBC - Radio 4
#EXTINF:-1,BBC - Radio 5 live