Skip to content

Instantly share code, notes, and snippets.

@alvinl
alvinl / vpn.sh
Created April 21, 2012 20:45
Script to install pptp on Debian 6
#!/bin/bash
apt-get update
apt-get install pptpd -y
echo localip 192.168.240.1 >> /etc/pptpd.conf
echo remoteip 192.168.240.2-9 >> /etc/pptpd.conf
echo ms-dns 8.8.8.8 >> /etc/ppp/pptpd-options
echo ms-dns 8.8.4.4 >> /etc/ppp/pptpd-options
echo "vpn pptpd pass123 *" | tee -a /etc/ppp/chap-secrets
/etc/init.d/pptpd restart
@alvinl
alvinl / forge.sh
Created December 14, 2012 03:14
Minecraft server install script
#!/bin/bash
# Minecraft install script
apt-get update
apt-get install screen -y
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-7u3-download-1501626.html;" http://download.oracle.com/otn-pub/java/jdk/7u9-b05/jdk-7u9-linux-i586.tar.gz
mkdir /usr/lib/jvm/
tar -zxvf jdk-7u9-linux-i586.tar.gz -C /usr/lib/jvm/
rm jdk-7u9-linux-i586.tar.gz
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_09/bin/java 1065
@alvinl
alvinl / md5.sh
Created December 26, 2012 05:59
Generates md5 hash per line in a given file
#!/bin/bash
while read line
do echo -n $line|md5
done < $1
@alvinl
alvinl / config
Created June 1, 2013 18:34
nginx-express
server {
listen 80;
server_name yourdomain.com;
# Let's put all static files like images, js and css in sub-folder: public
root /opt/apps/firstapp/public;
# static content
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
# access_log off;
@alvinl
alvinl / gist:5788654
Last active December 18, 2015 13:18
#This will set the login shell
export PS1='\u@\h:\[\e[0;32m\]\w\[\e[0m\] $ '
### Aliases
alias ..="cd .."
alias la="ls -la"
alias c="clear"
alias ap="aptitude"
alias cl="curl -L"
alias fm="free -m"
@alvinl
alvinl / bootstrap.sh
Last active December 18, 2015 13:18
#!/bin/bash
echo "Setting up .bashrc"
curl https://gist.github.com/Alvinlz/5788654/raw/c0e096298776db6acdea4dd24779f61c90ccbfa5/gistfile1.txt > ~/.bashrc
echo "Done."
echo "Removing bash history"
rm ~/.bash_history
echo "Installing packages"
sudo apt-get install -y aptitude
{
"botname": "donation bot",
"username": "bot username",
"password": "bot password",
"admins": ["123456"],
"autoAccept": true,
"idle": true,
"idleGames": [440],
"debug": false,
"tradeWhitelist": {
{
"botname": "donation bot",
"username": "bot username",
"password": "bot password",
"admins": ["123456"],
"autoAccept": true,
"idle": true,
"idleGames": [440],
"debug": false,
"tradeWhitelist": {
@alvinl
alvinl / index.html
Created August 7, 2013 18:35
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@alvinl
alvinl / req
Last active December 22, 2015 01:59
plugin
- JetPack
- Auto Donation timer
- Donate add in game example !donate itzwizzard, and that will add me to the 1 month timer of donator
- slot reservation for donators
- Gold wep skin for there class
- Sparkle trail that can be toggled by doing !trail, do it once turnes it on, twise turns it off and so on.
- A green D next to there name and pink txt colour