Skip to content

Instantly share code, notes, and snippets.

@ogny
ogny / 000-readme.md
Last active February 12, 2019 13:48 — forked from thomasdarimont/000-readme.md
nginx upstream backend

Python 2.7

python -m SimpleHTTPServer

Python 3.x

python -m http.server

Terminal 1

python -m http.server 8001

@ogny
ogny / gist:2e494823da5cca8768d3d2bab8bdfbb0
Created August 26, 2016 10:59 — forked from tjackowiak/gist:5058743
Moving Graphite database
1. Stop Apache
sudo /etc/init.d/apache2 stop
2. Stop Carbon
sudo su www-data
cd /opt/graphite/
./bin/carbon-cache.py stop
3. Move whisper directory to new location
@ogny
ogny / redis_bulk.sh
Created February 2, 2016 13:59 — forked from egemenyildiz/redis_bulk.sh
Redis key'lerde toplu degisiklik
# Bulk deletes keys start with "prefix"
EVAL "for i, name in ipairs(redis.call('KEYS', 'prefix*')) do redis.call('DEL', name); end" 0
# Bulk renames keys start with "prefix" to "postfix".
# e.g. prefixwithtail -> postfixwithtail
EVAL "for i, name in ipairs(redis.call('KEYS', 'prefix*')) do local x = string.gsub(name, 'pre', 'post'); redis.call('RENAME', name, x); end" 0
@ogny
ogny / tmux-cheatsheet.markdown
Last active September 4, 2015 09:03 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname