Skip to content

Instantly share code, notes, and snippets.

@pete
pete / Makefile
Last active October 7, 2017 01:23
# This gives you the ability to do
# git tag -a -m '1.0' 1.0
# make upload-release-1.0
# Written off the top of my head and not tested.
# Use at your own peril.
.PHONY: release
release:
mkdir -p release
require 'redic'
require 'watts'
require 'hoshi'
class ShortLink < Watts::App
class Hello < Watts::Resource
def redis
@redis ||= Redic.new 'redis://localhost:6379'
end
@tanyuan
tanyuan / smart-caps-lock.md
Last active June 18, 2024 19:36
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.

tmux cheatsheet

As configured in henrik dotfiles.

start new:

tmux

start new with session name:

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 21, 2024 01:45
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@kevinkarwaski
kevinkarwaski / multi_env_knife_config
Created February 18, 2012 19:06
Knife config for Multiple Chef Environments
#
# This is an example of a knife.rb configuration that uses yml and a
# simple env var (CHEF_ENV) to manage multiple hosted Chef environments.
#
# Example usage:
# export CHEF_ENV=evnironment_01
# knife status
#
# Based on: http://blog.blankpad.net/2010/09/28/multiple-knife-environments---the-return/
#
@pete
pete / gist:1152433
Last active September 26, 2015 20:07
Metabolic Fascism!
From Olin Shivers's "opinion file", a collection of posts from the "Opinion
Bboard" at CMU ( http://www.ccs.neu.edu/home/shivers/opinion.html ):
17-May-89 12:18 Hans.Tallis@ML metabolic fascism
Article 106 of ics.whimsey:
>From: David A Honig <honig@BONNIE.ICS.UCI.EDU>
Subject: Metabolic Fascism
Lines: 144
------------------------------------------------------------------------