Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
BACKUP=/home/backups/redis
REDIS_SOURCE=/var/lib/redis/dump.rdb
REDIS_DEST=$BACKUP/$(date +"%Y-%m-%d")-dump.rdb
find $BACKUP/* -name "*.rdb" -mtime +7 -exec rm {} \;
redis-cli save > /dev/null
cp $REDIS_SOURCE $REDIS_DEST
@v-thomp4
v-thomp4 / maintenance.html
Last active November 1, 2015 10:53 — forked from pitch-gist/gist:2999707
maintenance page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
sudo sed -i -r 's/(\[.+\])$/\1\nStartupWMClass=Google-chrome-stable/g' /usr/share/applications/google-chrome.desktop
@v-thomp4
v-thomp4 / perfectelementary.bash
Last active September 13, 2022 13:10
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#https://elementary.io/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
@v-thomp4
v-thomp4 / installation.sh
Created November 30, 2016 15:00 — forked from mikhailov/installation.sh
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@v-thomp4
v-thomp4 / Compile_Bitcoin_on_Ubuntu_14_04
Last active February 19, 2017 09:15 — forked from kostaz/Compile_Bitcoin_on_Ubuntu_14_04
Compile Bitcoin on Ubuntu 14.04
Assuming the username of the Ubuntu user is "theusername".
Preparation
-----------
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
@v-thomp4
v-thomp4 / supervisord.sh
Created March 1, 2017 02:39 — forked from danmackinlay/supervisord.sh
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.

How To Clone Scrypt Based Altcoins for Fun and Profit

Wait a second, why would you want to give out the secrets?!? Because its not a secret anymore and besides, why shouldn't everyone and their neighbors be able to create a plethora of these useless yet exciting math bits? The information in this article took me a few weeks to compile and what works for me is not guaranteed to work for you. Please use this guide as a starting point to learn a bit about C programming and compiling software.

@v-thomp4
v-thomp4 / SimpleHTTPServerWithUpload.py
Created January 2, 2018 06:59 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""