This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# encoding: utf-8 | |
"""Use instead of `python3 -m http.server` when you need CORS""" | |
from http.server import HTTPServer, SimpleHTTPRequestHandler | |
class CORSRequestHandler(SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_header('Access-Control-Allow-Origin', '*') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# after appcleaner does his magic, do this | |
sudo rm -rf "/Library/Application Support/Paragon Software/" | |
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist | |
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist | |
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist | |
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist | |
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/ | |
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer | |
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Shell script to backup MySQL database | |
# Set these variables | |
MyUSER="" # DB_USERNAME | |
MyPASS="" # DB_PASSWORD | |
MyHOST="" # DB_HOSTNAME | |
# Backup Dest directory | |
DEST="" # /home/username/backups/DB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum groupinstall "Development Tools" && | |
# Define softether version | |
RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) | |
IFS='-' read -r -a RTMS <<< "${RTM}" | |
# Get softether source | |
wget "http://www.softether-download.com/files/softether/${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-${RTMS[4]}/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-linux-x64-64bit.tar.gz" -O /tmp/softether-vpnserver.tar.gz && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo yum update -y | |
sudo yum install tmux gcc wget htop epel-release fail2ban -y | |
wget -O vpnserver.tar.gz http://jp.softether-download.com/files/softether/v4.22-9634-beta-2016.11.27-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.22-9634-beta-2016.11.27-linux-x64-64bit.tar.gz | |
tar -zxvf vpnserver.tar.gz | |
cd vpnserver/ | |
# printf '1\n1\n1\n' | ./.install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Register digitalocean with free credit https://m.do.co/c/4879bb02d178 | |
# Create vps with 5usd price | |
# Update system | |
apt-get update && apt-get -y upgrade | |
# Get build tools | |
apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev | |
# Define softether version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://lambdalisue.hatenablog.com/entry/2013/07/03/023934 | |
sudo aptitude install -y libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev liblua5.2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev lua5.2 ruby mercurial | |
sudo aptitude remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common | |
cd $HOME | |
mkdir src && cd src | |
hg clone https://code.google.com/p/vim/ | |
cd vim | |
./configure --with-features=huge --disable-darwin --disable-selinux --enable-luainterp --enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-tclinterp --enable-rubyinterp --enable-cscope --enable-multibyte --enable-xim --enable-fontset | |
make |