Skip to content

Instantly share code, notes, and snippets.

@notmii
notmii / SSH Server Config
Created October 4, 2013 15:08
Hardening SSH Server
PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
PermitRootLogin no
@notmii
notmii / SSL Certificate (Self Signed)
Last active December 24, 2015 16:29
Generating a self signed SSL Certificate
#!/bin/bash
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# nginx example
#
# server {
# server_name YOUR_DOMAINNAME_HERE;
@notmii
notmii / install-git
Created October 19, 2013 09:28
Installion files
#!/bin/bash
make prefix=/usr/local all
sudo checkinstall
#sudo make prefix=/usr/local install
sudo update-alternatives --install /usr/bin/git git /usr/local/bin/git 1
sudo update-alternatives --set git /usr/bin/git
which git
git --version
@notmii
notmii / install-fuelphp
Last active December 26, 2015 21:29
FuelPHP Framework Installer
branch=$1
dir=$2
git clone -b $branch git://github.com/fuel/fuel.git $dir
cd "$dir"
rm -rf .git \
.gitmodules \
*.md \
docs \
#!/bin/bash
sudo apt-get install --yes python-software-properties
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/5.5/ubuntu precise main'
sudo add-apt-repository 'deb-src http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/5.5/ubuntu precise main'
echo "Package: * \
Pin: origin ftp.yz.yamagata-u.ac.jp \
Pin-Priority: 1000" > /etc/apt/preferences.d/mariadb.pref
#!/bin/bash
echo "Installing NPM"
sudo apt-get install --yes npm
sudo npm update -g npm
npm -v
echo "Updating node.js"
sudo npm config set registry http://registry.npmjs.org/
sudo npm cache clean -f
sudo npm install -g n
@notmii
notmii / install-vim.sh
Last active January 1, 2016 08:39
Installing vim from source
#!/bin/bash
curl https://gist.githubusercontent.com/notmii/8211765/raw/1440ac89f3ddd1af40381203e35b2b6a645a1baf/install-lua | sh
sudo apt-get install --yes checkinstall auto-apt mercurial
hg clone https://vim.googlecode.com/hg/ vim-source
cd vim-source && hg pull && hg update
sudo apt-get remove --purge vim \
vim-runtime \
@notmii
notmii / install-lua
Last active January 1, 2016 22:39
Install lua
#!/bin/bash
sudo apt-get remove --purge lua
sudo apt-get install --yes checkinstall auto-apt curl
sudo apt-get install --yes libreadline6-dev
curl -R -O http://www.lua.org/ftp/lua-5.2.3.tar.gz
tar zxf lua-5.2.3.tar.gz
cd lua-5.2.3
sudo make linux test \
#!/bin/bash
sudo apt-get remove --purge ctags
sudo apt-get install --yes auto-apt checkinstall
sudo apt-get install --yes subversion autoconf gcc
svn checkout https://svn.code.sf.net/p/ctags/code/trunk ctags-trunk
cd ctags-trunk
# Patch PHP Parser for better PHP 5.3+ support
@notmii
notmii / install-php
Last active January 3, 2016 20:58
Install PHP
#!/bin/bash
sudo apt-get remove --purge php
sudo apt-get install -y checkinstall auto-apt autoconf
sudo apt-get install -y libxml2-dev libcurl4-gnutls-dev curl libreadline6-dev libssl-dev
wget http://jp1.php.net/distributions/php-5.5.8.tar.gz \
&& tar xzf php-5.5.8.tar.gz
cd php-5.5.8