Skip to content

Instantly share code, notes, and snippets.

View rgabo's full-sized avatar

Gabor Ratky rgabo

  • The Hague, Netherlands
  • X @rgabo
View GitHub Profile
@tmichel
tmichel / bash_cheatsheet.md
Created June 16, 2017 12:57
Bash cheat sheet

Shell cheat sheet

Setting up iTerm

  • Use option as meta key:

Go to Preferences->Profiles tab. Select your profile on the left, and then open the Keyboard tab. At the bottom is a set of buttons that lets you select the behavior of the Option key. For most users, Esc+ will be the best choice.

  • Setting up word-by-word movement with Option+:
# file name terraform/modules/aws_vpc/vpc.tf
# first create the VPC.
# Prefix resources with var.name so we can have many environments trivially
resource "aws_vpc" "mod" {
cidr_block = "${var.cidr}"
enable_dns_hostnames = "${var.enable_dns_hostnames}"
enable_dns_support = "${var.enable_dns_support}"
tags {
Name = "${var.env}_vpc"
@jbinto
jbinto / ssl-cert-upgrade-cloudfront.md
Last active February 20, 2020 08:28
Upgrading SSL certificate on Cloudfront

Upgrading SSL certificate on Cloudfront

Last year I set up jessebuchanan.ca with an SSL certificate on Amazon S3 / CloudFront.

Now, it's time to renew the certificate.

The first time was fraught with peril, but I eventually got it working.

This time I will document the steps to renew the cert. Most steps for a new installation would be omitted.

@chernjie
chernjie / logrotate.d-docker
Created April 17, 2015 17:31
Logrotate docker logs, copy this file to /etc/logrotate.d/docker
/var/lib/docker/containers/*/*-json.log {
dateext
daily
rotate 365
compress
delaycompress
missingok
}

Boxen uses a bunch of shellscripts to insert itself into your environment on shell load.

These assume a POSIX shell, which fish is not.

Run this script to generate a fish-compatible config file in ~/.config/fish/boxen.fish, which you can source at the end of your ~/.config/fish/config.fish.

@jfryman
jfryman / personal_boxen_manifest.pp
Last active November 30, 2019 05:05
Personal Boxen Manifest
class people::jfryman {
# Applications
include chrome::stable
include onepassword
include dropbox
include alfred
include macvim
include zsh
include homebrew
include fitbit
@ScotterC
ScotterC / gist:4956080
Last active December 13, 2015 18:29
Setting up Wukong-Hadoop on EMR, bootstrap script. (Wukong 3.0)
#!/bin/bash
# Update, upgrade and install development tools:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created April 1, 2011 20:29
Script to delete all tags both locally and remotely
for t in `git tag`
do
git push origin :$t
git tag -d $t
done
@guilleiguaran
guilleiguaran / spec_helper.rb
Created February 21, 2011 00:43
My spec_helper for Spork with Rails3, RSpec2, Devise, FactoryGirl
require 'spork'
ENV["RAILS_ENV"] = 'test'
Spork.prefork do
require "rails/application"
Spork.trap_method(Rails::Application, :reload_routes!)
require File.expand_path("../../config/environment", __FILE__)