Skip to content

Instantly share code, notes, and snippets.

View dmishh's full-sized avatar
🚀
Building a rocketship!

Dmytro Shcherbyna dmishh

🚀
Building a rocketship!
View GitHub Profile
start on starting <%= app %>-<%= name %>
stop on stopping <%= app %>-<%= name %>
respawn
exec su - <%= user %> --session-command 'cd <%= engine.root %>; export PORT=<%= port %>;<% engine.env.each_pair do |var,env| %> export <%= var.upcase %>=<%= shell_quote(env) %>; <% end %> <%= process.command %> >> <%= log %>/<%=name%>-<%=num%>.log 2>&1'
@dmishh
dmishh / tmux.md
Last active August 29, 2015 14:20 — 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

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@dmishh
dmishh / catim
Created January 9, 2014 15:55 — forked from smileart/catim
# Install http://pygments.org/download/ to use this improved cat!
cat() {
if command -v pygmentize > /dev/null; then
pygmentize $1 > /dev/null 2>&1
if [ $? -eq 0 ]; then
pygmentize $1
else
command cat $1
fi
else
@dmishh
dmishh / Comment Line.sublime-macro
Created November 3, 2013 20:00
Sublime Text comment line macro like in PhpStorm (caret moves 1 line down after commenting line)
[
{ "command": "toggle_comment", "args": { "block": false } },
{ "command": "move", "args": {"by": "lines", "forward": true } }
]
@dmishh
dmishh / Default (OSX).sublime-keymap
Created November 3, 2013 19:58
My Sublime Text keymap
[
{ "keys": ["super+shift+'"], "command": "reindent" },
{ "keys": ["alt+f1"], "command": "reveal_in_side_bar" },
{ "keys": ["ctrl+t"], "command": "side_bar_new_file2" },
{ "keys": ["f2"], "command": "side_bar_rename" },
{ "keys": ["shift+super+up"], "command": "swap_line_up" },
{ "keys": ["shift+super+down"], "command": "swap_line_down" },
{ "keys": ["super+backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+/"], "command": "run_macro_file", "args": {"file": "Packages/User/Comment Line.sublime-macro"} },
{ "keys": ["super+shift+r"], "command": "goto_symbol_in_project" },
@dmishh
dmishh / Preferences.sublime-settings
Last active December 27, 2015 08:09
My Sublime Text preferences
{
"bold_folder_labels": true,
"color_scheme": "Packages/Phix Color Scheme/Phix Dark.tmTheme",
"default_line_ending": "unix",
"detect_indentation": false,
"dictionary": "Packages/Language - English/en_US.dic",
"draw_indent_guides": true,
"ensure_newline_at_eof_on_save": false,
"fade_fold_buttons": false,
"file_exclude_patterns":
@dmishh
dmishh / README.md
Created October 23, 2013 14:45 — forked from nikcub/README.md
@dmishh
dmishh / key.sh
Created October 15, 2013 14:26 — forked from smileart/key.sh
# Add ’alias key='~/key.sh'’ to .bashrc or .zshrc
case "$1" in
"off") sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1
echo "Keyboard is temporary disabled"
;;
"on") sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1
echo "Keyboard is enabled again"
;;
"easy") sudo -K
@dmishh
dmishh / key.sh
Created October 15, 2013 11:50 — forked from smileart/key.sh
# Add ’alias key='~/key.sh'’ to .bashrc or .zshrc
case "$1" in
"off") echo "Keyboard is temporary disabled"
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1
;;
"on") echo "Keyboard is enabled again"
sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1
;;
"easy") echo "Keyboard is temporary disabled. Press ’any key’ ;) to enable"