Skip to content

Instantly share code, notes, and snippets.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@jottr
jottr / ApplePressAndHoldEnabled.sh
Last active August 29, 2015 14:03
Reenable Press and Hold on OSX
#!/bin/bash
# As per http://osxdaily.com/2011/08/04/enable-key-repeat-mac-os-x-lion/
# Most apps need to be relaunched to make the setting stick.
defaults write -g ApplePressAndHoldEnabled -bool true
@jottr
jottr / Gemfile
Created September 17, 2014 15:46
source 'https://rubygems.org'
ruby '2.0.0'
gem 'dotenv-rails', :groups => [:development, :test]
gem 'rails', '~> 4.1.6'
gem 'rails-api', '~> 0.2.1'
# PostgreSQL
gem 'pg', '~> 0.17.1'
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'

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 "your_email@youremail.com"
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.011 000.011: --- VIM STARTING ---
000.097 000.086: Allocated generic buffers
000.521 000.424: locale set
000.526 000.005: clipboard setup
@jottr
jottr / tmux.md
Last active August 29, 2015 14:08 — forked from andreyvit/tmux.md

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

@jottr
jottr / howto-EW-7811Un.md
Last active August 29, 2015 14:10
Howto Edimax EW-7811Un on Arch Linux with systemd-networkd.

NOT FINISHED

$ lsusb
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Install the driver module:

$ pacman -Sy hostapd-8192cu wpa_supplicant
@jottr
jottr / .vimrc
Created November 23, 2014 12:52
A nice commented .vimrc taken from https://github.com/rdlugosz/dotfiles/blob/master/vimrc for inspiration
" Vim configuration. Thoroughly annotated with comments for two reasons:
" 1. Hopefully this is helpful to others
" 2. I often can't remember why something is set is a certain way or what a
" specific plugin provides!
"
" Note to future self: Git history was lost during a rename; you can see it by
" adding the `--follow` option to `git log`.
"
" Any questions, contact @lbwski