start new:
tmux
start new with session name:
tmux new -s myname
# Rime alternative settings | |
# encoding: utf-8 | |
# | |
# difference from default settings: | |
# 1. ascii-style punctuation in half-shape mode | |
# 2. [ ] as paging keys | |
# | |
# save this file as: | |
# (Linux) ~/.config/ibus/rime/alternative.yaml | |
# (Mac OS) ~/Library/Rime/alternative.yaml |
# from i8ramin - http://getintothis.com/blog/2012/04/02/git-grep-and-blame-bash-function/ | |
# runs git grep on a pattern, and then uses git blame to who did it | |
ggb() { | |
git grep -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done | |
} | |
# small modification for git egrep bash | |
geb() { | |
git grep -E -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done | |
} |
deprecated
for_window [class="^.*"] border pixel 1
new_window 1pixel
thanks to deviatorslegacy's comment
Document here:
https://i3wm.org/docs/userguide.html#_default_border_style_for_new_windows
# NOTE: registry keys for IE 8, may vary for other versions | |
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | |
function Clear-Proxy | |
{ | |
Set-ItemProperty -Path $regPath -Name ProxyEnable -Value 0 | |
Set-ItemProperty -Path $regPath -Name ProxyServer -Value '' | |
Set-ItemProperty -Path $regPath -Name ProxyOverride -Value '' | |
[Environment]::SetEnvironmentVariable('http_proxy', $null, 'User') |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
function gh --description 'Open the webpage for the current github repo/branch' | |
set -l fetch_url (command git remote --verbose show -n origin ^/dev/null | command grep Fetch | cut -c 14- ) | |
#did we get an exit status? | |
if [ $status -gt 0 ] | |
echo 'Not a git repo.' | |
return 1 | |
end | |
if [ -z $fetch_url ] |