Skip to content

Instantly share code, notes, and snippets.

@abegodong
abegodong / directadmin-letsencrypt.md
Last active January 22, 2016 06:46
Install SSL Certificate

Setup Directadmin with LetsEncrypt SSL

  1. install GIT, for Debian/Ubuntu apt-get install -y git and for Centos yum install -y git
@abegodong
abegodong / caddy.sh
Created December 24, 2015 00:07
Caddy installer
#!/bin/sh
apt-get update && apt-get -y upgrade
apt-get install curl
mkdir caddy && cd caddy
curl -s "https://caddyserver.com/download/build?os=linux&arch=amd64&features=cors%2Cgit%2Cipfilter" | tar xz
mv caddy /usr/bin
cd .. && rm -rf caddy
@abegodong
abegodong / php7.sh
Last active April 7, 2017 12:41
PHP 7 installer for Ubuntu 14.04
#!/bin/bash
# https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04
apt-get install -y language-pack-en-base software-properties-common
LC_ALL=en_US.UTF-8
add-apt-repository -y ppa:ondrej/php
apt-get update
apt-get -y install php7.1 php7.1-fpm php7.1-curl php7.1-mysql php7.1-mcrypt php7.1-gd php7.1-odbc php7.1-bz2 php7.1-mbstring php7.1-soap php7.1-xml php7.1-opcache php7.1-memcached php7.1-mbstring php7.1-zip php-pear
apt-get -y install php7.0 php7.0-fpm php7.0-curl php7.0-mysql php7.0-mcrypt php7.0-gd php7.0-odbc php7.0-bz2 php7.0-mbstring php7.0-soap php7.0-xml php7.0-opcache php7.0-memcached php7.0-mbstring php7.0-zip php-pear
@abegodong
abegodong / transmission.sh
Created November 26, 2015 22:56
Transmission Daemon Installer
apt-get update -y && apt-get upgrade -y
apt-get dist-upgrade -y
apt-get -y install python-software-properties vim
add-apt-repository -y ppa:transmissionbt/ppa
apt-get -y update
apt-get -y install transmission-cli transmission-common transmission-daemon nginx
@abegodong
abegodong / initd-nodhcp
Last active June 6, 2020 03:33
Softether VPN + DNSMasq
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
SERVER_IP=[SERVER_IP]
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
@abegodong
abegodong / keybase.md
Created November 9, 2015 07:43
Keybase

Keybase proof

I hereby claim:

  • I am abegodong on github.
  • I am abg (https://keybase.io/abg) on keybase.
  • I have a public key whose fingerprint is F808 8B04 E899 75F6 5942 AD96 E5E6 BB00 E429 96FF

To claim this, I am signing this object:

@abegodong
abegodong / ramcache.sh
Created November 9, 2015 06:27
Ramcache
#!/bin/sh
mkfs -t ext2 -q /dev/ram1 32000
[ ! -d /ramcache ] && mkdir -p /ramcache
mount /dev/ram1 /ramcache
@abegodong
abegodong / Step #1
Last active December 19, 2015 03:59
PHP 5.4 Ubuntu 12.04
sudo apt-get install python-software-properties
# Mac OSX Mountain Lion
# Ruby on Rails Development Environment
# RVM
curl -L https://get.rvm.io | bash -s stable && rvm install 1.9.3 && rvm install 1.8.7
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source ~/.bash_profile
# Disable rarely used RDOC
@abegodong
abegodong / gist:5856485
Created June 25, 2013 06:47
Deployment using git checkout
#!/bin/bash
# Server deployment using git
# Created on: 2012.04.13
# Created by: Abraham Godong
GIT_PATH="/usr/bin/git"
GIT_REPO_URL=$1
GIT_BRANCH=$2
GIT_CL_DIR=$3
CL_USER=""$4