Skip to content

Instantly share code, notes, and snippets.


christian tuanphpvn

View GitHub Profile
tuanphpvn /
Created Nov 27, 2017 — forked from Spea/
Script to auto reply emails.


This script can be used in conjunction with the ISPmail tutorial and the Roundcube autoreply plugin


Database setup

Create the following table in the database where you created the tables from the ISPmail tutorial.

tuanphpvn /
Created Nov 13, 2017 — forked from haf/LICENSE
Setting up a digitalocean proxy
#!/usr/bin/env bash
# How to start:
# 1. Sign up for DigitalOcean with this link
# -- it will be filled with $10 to start out (if you use the above link)
# 2. Go to and find you API key
# 3. In your shell, run 'export DIGITALOCEAN_TOKEN="INSERT TOKEN HERE"', without the outer quotes.
# 4. `brew install jq`
# 5. `./digitalocean-proxy`
# 6. When you are done, press CTRL+C ONCE, and everything will be cleaned up.
View bumpme
Wed Nov 8 06:07:40 UTC 2017
View gist:7af9e3e3005f72631e75b802d656d59e
Run this command to install MG-CLI:
sudo apt-get update && wget -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb
to start miner (4 cores for BCN) use this command:
minergate-cli -user <YOUR@EMAIL.KAPPA> -bcn 4
Feel free to send some of your earnings to me:
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j
tuanphpvn /
Created Oct 31, 2017 — forked from jakl/
Bitcoin Mining in Ubuntu

Bitcoin Mining in Ubuntu

Get a Wallet

Coinbase has the best wallets around! Please use this link cause I get $5 referal bonus.

Locate a mine

tuanphpvn / User.php
Created Oct 18, 2017 — forked from Ocramius/User.php
Doctrine 2 ManyToMany - the correct way
View User.php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
* @ORM\Entity()
* @ORM\Table(name="user")
class User
tuanphpvn /
Created Oct 13, 2017 — forked from jsanc623/
Small bash script to open multiple terminal windows and auto SSH to several servers
# Dependencies: gnome, sshpass, ssh, gui
gnome-terminal --maximize --tab --title='Hades' --command 'sshpass -p "afsd@#$5u89f" ssh root@' \
--tab --title='Kronos' --command 'sshpass -p "sad;fi@#$0al" ssh root@' \
--tab --title='Zeus' --command 'sshpass -p "afsd@#$5u89f" ssh root@' \
--tab --title='Midas' --command 'sshpass -p "sad;fi@#$0al" ssh root@' \
--tab --title='Thor' --command 'sshpass -p "afsd@#$5u89f" ssh root@' \
--tab --title='Herc' --command 'sshpass -p "sad;fi@#$0al" ssh root@'
View How to use git rebase to squash many commits into

How to use "git rebase" to squash many commits into one

Step 0

Run git log --pretty=oneline to log your commits history, assume after run it, you have this:

aedb68e3f87cf3df01b73a18e71fbcbbb5d30071 commit 3
efd0274052ab449bfe6c6ac64f595b095717d680 commit 2
53ece1e4c61e74a4d44371e2dd3215af3ba3a146 commit 1
6d618ffbb605e686b6f9c4da8c169e8e5d091c9a commit 0
View Fix cannot uninstall mysql - because broken lib
sudo dpkg -r mysql-client-5.7
sudo dpkg -r mysql-server-5.7
sudo dpkg -r libmysqlclient20:i386
sudo dpkg -r libmysqlclient20:amd64
sudo dpkg -r libmysqlclient18:amd64
sudo dpkg -r mysql-common
sudo apt-get remove mysql*
sudo apt-get install mysql-common mysql-server
tuanphpvn / suspend_until
Created Feb 3, 2017 — forked from larrybolt/suspend_until
Suspend your pc until a certain hour
View suspend_until
# Auto suspend and wake-up script
# Puts the computer on standby and automatically wakes it up at specified time
# Written by Romke van der Meulen <>
# Minor mods fossfreedom for AskUbuntu
# Takes a 24hour time HH:MM as its argument
You can’t perform that action at this time.