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
0421c6c0211cefbc119577760f8e1a7ef3b845941a3cda581900432a17abab278cf6a8e33455e4ae53a7c1945fc7831dbf4ab01fc87868559dc2b5fa88b0b7a642 |
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
Useful keys | |
These are the keys I use most times I run cmus. If you want to do even more with cmus or change the keybindings, read the help I link to in this page's conclusion. | |
v - stop playback | |
b - next track | |
z - previous track |
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
ssh-copy-id username@hostname | |
# Source: http://www.commandlinefu.com/commands/view/771/copy-your-ssh-public-key-on-a-remote-machine-for-passwordless-login-the-easy-way |
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
ifconfig | convert label:@- ip.png | |
# Source: http://www.commandlinefu.com/commands/view/9104/save-command-output-to-image |
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 ifconfig.me |
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
# e.g. add vlc to startup items | |
$ cp /usr/share/applications/vlc.desktop ~/.config/autostart/ |
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/bash | |
# | |
# Release memory used by the Linux kernel on caches. | |
free -m | |
sudo sysctl -w vm.drop_caches=3 | |
sleep 5 | |
sync && echo 3 > sudo /proc/sys/vm/drop_caches | |
free -m |
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
check process redis-server | |
with pidfile "/var/run/redis.pid" | |
start program = "/etc/init.d/redis-server start" | |
stop program = "/etc/init.d/redis-server stop" | |
if 2 restarts within 3 cycles then timeout | |
if totalmem > 100 Mb then alert | |
if children > 255 for 5 cycles then stop | |
if cpu usage > 95% for 3 cycles then restart | |
if failed host 127.0.0.1 port 6379 then restart | |
if 5 restarts within 5 cycles then timeout |
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
check process memcached with pidfile /var/run/memcached.pid | |
start program = "/etc/init.d/memcached start" | |
stop program = "/etc/init.d/memcached stop" | |
if failed host 127.0.0.1 port 11211 protocol MEMCACHE then restart | |
if cpu > 70% for 2 cycles then alert | |
if cpu > 98% for 5 cycles then restart | |
if 2 restarts within 3 cycles then timeout |
NewerOlder