Skip to content

Instantly share code, notes, and snippets.

View monodeep12's full-sized avatar

Monodeep Bhattacharjee monodeep12

View GitHub Profile
@monodeep12
monodeep12 / Remove all git tags
Created June 13, 2016 04:41 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
# e.g. add vlc to startup items
$ cp /usr/share/applications/vlc.desktop ~/.config/autostart/
@monodeep12
monodeep12 / freeme
Created February 17, 2016 03:28 — forked from vishaltelangre/freeme
Free up unused memory [ubuntu]
#!/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
@monodeep12
monodeep12 / redis.conf
Created February 12, 2016 03:43 — forked from cyx/gist:3690597
Monit Redis
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