Skip to content

Instantly share code, notes, and snippets.

@jottr
jottr / gmail_layout.js
Created June 6, 2015 14:24
Userscript that moves around certain aspects of gmail layout.
// ==UserScript==
// @name gmail layout
// @namespace http://mail.gogogle.com
// @version 0.1
// @description This script reorders some parts of the gmail layout
// @author jottr
// @match https://mail.google.com/mail/*
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
@jottr
jottr / bluetooth.txt
Created January 3, 2015 22:41
mavericks bluetooth audio quality settings.
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
@jottr
jottr / docker_cleanup.md
Last active August 29, 2015 14:10
Keeping a clean docker environment, taken from http://www.carlboettiger.info/2014/08/29/docker-notes

Keeping a clean docker environment run interactive containers with --rm flag to avoid having to remove them later.

Remove all stopped containers:

$ docker rm $(docker ps -a | grep Exited | awk '{print $1}')

Clean up un-tagged docker images:
$ docker rmi $(docker images -q --filter "dangling=true")

@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
@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 / 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

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

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 "[email protected]"
#!/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'
@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'