Skip to content

Instantly share code, notes, and snippets.

christian tuanphpvn

Block or report user

Report or block tuanphpvn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

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

General

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

Installation

Database setup

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

@tuanphpvn
tuanphpvn / digitalocean-proxy.sh
Created Nov 13, 2017 — forked from haf/LICENSE
Setting up a digitalocean proxy
View digitalocean-proxy.sh
#!/usr/bin/env bash
# How to start:
# 1. Sign up for DigitalOcean with this link https://www.digitalocean.com/?refcode=7bf219507e61
# -- it will be filled with $10 to start out (if you use the above link)
# 2. Go to https://cloud.digitalocean.com/settings/applications 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 https://minergate.com/download/deb-cli -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
tuanphpvn / README.md
Created Oct 31, 2017 — forked from jakl/README.md
Bitcoin Mining in Ubuntu
View README.md

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

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
tuanphpvn / suspend_until
Created Feb 3, 2017 — forked from larrybolt/suspend_until
Suspend your pc until a certain hour
View suspend_until
#!/bin/bash
# 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 <redge.online@gmail.com>
# Minor mods fossfreedom for AskUbuntu
#
# Takes a 24hour time HH:MM as its argument
You can’t perform that action at this time.