This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
" save in ~/.vim/vimrc | |
" open vim and type `:PlugInstall<cr>` | |
" your leader key, useful to add your own mappings. ',' is an example, use | |
" what you want | |
let g:mapleader = ',' | |
call plug#begin('~/.vim/plugged') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
host=https://emkc.org/api/v1/piston | |
POST=$host/execute | |
GET=$host/versions | |
usage() { | |
echo "$0 [debug] {version OR FILENAME [ARG1 [ARG2 [...]]]}" | |
echo | |
echo "\tdebug : Display the json request sent to the api." | |
echo "\t It has no effect when used with version." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encode inputfile.tar.gz as a series of video frames | |
# Frames are written to frames/frameNNNN.png | |
from PIL import Image | |
with open('inputfile.tar.gz', 'rb') as f: | |
data = f.read() | |
WIDTH = 120 | |
HEIGHT = 90 | |
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# \ and - to split to the session working directory (SWD) | |
bind \\ split-window -h | |
bind - split-window -v | |
# hold shift to split to current path | |
bind | split-window -h -c "#{pane_current_path}" | |
bind _ split-window -v -c "#{pane_current_path}" | |
# change SWD to current pane path | |
bind W attach-session -t . -c "#{pane_current_path}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# requires jq | |
stick_to="name" && cmd="workspace" # stick to the workspace | |
# stick_to="output" && cmd="focus output" # stick to the screen | |
initial=$( | |
i3-msg -t get_workspaces | | |
jq -r ".[] | select(.focused == true) | .$stick_to" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
synclient TouchpadOff=$(synclient -l | awk '/TouchpadOff/ {print 1-$3}') |