This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
" Sticky shift in English keyboard."{{{ | |
" Sticky key. | |
inoremap <expr> ; <SID>sticky_func() | |
cnoremap <expr> ; <SID>sticky_func() | |
snoremap <expr> ; <SID>sticky_func() | |
function! s:sticky_func() | |
let l:sticky_table = { | |
\',' : '<', '.' : '>', '/' : '?', | |
\'1' : '!', '2' : '@', '3' : '#', '4' : '$', '5' : '%', |
# Complete words from tmux pane(s) {{{1 | |
# Source: http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane.html | |
# Gist: https://gist.github.com/blueyed/6856354 | |
_tmux_pane_words() { | |
local expl | |
local -a w | |
if [[ -z "$TMUX_PANE" ]]; then | |
_message "not running inside tmux!" | |
return 1 | |
fi |
This small subclass of the Pandas sqlalchemy-based SQL support for reading/storing tables uses the Postgres-specific "COPY FROM" method to insert large amounts of data to the database. It is much faster that using INSERT. To acheive this, the table is created in the normal way using sqlalchemy but no data is inserted. Instead the data is saved to a temporary CSV file (using Pandas' mature CSV support) then read back to Postgres using Psychopg2 support for COPY FROM STDIN.
Create a template service file at /etc/systemd/system/[email protected]
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
## General Stuff | |
### List all tables | |
SELECT * FROM pg_catalog.pg_tables | |
### Create a new user and give it superuser access | |
CREATE USER adminuser createuser password '1234Admin'; | |
ALTER USER adminuser createuser; | |
### Create a user without superuser privilege |
import sys | |
def j(lineno): | |
frame = sys._getframe().f_back | |
called_from = frame | |
def hook(frame, event, arg): | |
if event == 'line' and frame == called_from: | |
try: | |
frame.f_lineno = lineno |
/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉
~/.ssh/config
, set each ssh key for each repository as in this exemple:When I click on links from Slack or Outlook on MacOS they open in seemingly random browser windows/profiles. This is annoying.
Open links in a particular google chrome profile window. Be less annoyed.
chrome://version
and find the desired profile name. Mine was Default
. Copy that profile's directory name, like Profile 2
or Default
, not the profile's vanity name you see when you click on your profile icon in the browser.brew install finicky
. After install it should be running and you should see the icon in the upper toolbar.> Config > Create New
~/.finicky
and make it look something like this, filling in your profile name: