Skip to content

Instantly share code, notes, and snippets.

View RoesWibowo's full-sized avatar
💰
Available for hire!

Roes Wibowo RoesWibowo

💰
Available for hire!
View GitHub Profile
@RoesWibowo
RoesWibowo / site.conf
Created August 21, 2016 04:58
Example nginx with alias without subdomain
server {
listen 80 deferred;
server_name server.com;
index index.php;
charset utf-8;
# App 1 (main app)
location / {
@RoesWibowo
RoesWibowo / site.conf
Last active August 21, 2016 04:58
Example apache2 virtual host using proxypass
# a2enmod proxy
# a2enmod proxy_http
# a2enmod proxy_ajp
# a2enmod rewrite
# a2enmod deflate
# a2enmod headers
# a2enmod proxy_balancer
# a2enmod proxy_connect
# a2enmod proxy_html
@RoesWibowo
RoesWibowo / .htaccess
Created August 15, 2016 07:57
Redirect www to non www
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect www to non www
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
@RoesWibowo
RoesWibowo / install.sh
Last active August 5, 2016 09:09
Install Oh My Zsh in Ubuntu
apt-get install zsh git-core -y
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
chsh -s `which zsh`
sudo shutdown -r 0
curl -L https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh > antigen.zsh
source antigen.zsh
@RoesWibowo
RoesWibowo / .htaccess
Created July 18, 2016 03:54
Redirect to ssl
#rewrite to HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@RoesWibowo
RoesWibowo / install.sh
Created July 1, 2016 09:59
Install docker ubuntu 14
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-cache policy docker-engine
apt-get install docker-engine -y
MORE: https://docs.docker.com/engine/installation/linux/ubuntulinux/
@RoesWibowo
RoesWibowo / install.sh
Last active November 15, 2016 02:57
Install nodejs ubuntu 16.X
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
apt-get install nodejs -y
npm install -g npm@latest
npm install -g webpack webpack-dev-server typings lite-server express
@RoesWibowo
RoesWibowo / isntall.sh
Created June 11, 2016 16:46
Install mongodb on Ubuntu server
# install required package (php5 dev, open ssl library and pcre)
sudo apt-get install php5-dev libssl-dev libcurl4-openssl-dev clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev apt-get install libpcre3-dev -y
# build mongodb extension for PHP
pecl install mongodb
@RoesWibowo
RoesWibowo / create-service.sh
Created June 11, 2016 07:24
MongoDB Windows
mongod -f "D:\Playground\mongodb\server.conf"
--install --serviceName mdb27017
--serviceDisplayName "MongoDB Server Instance 27017"
--serviceDescription "MongoDB Server Instance running on 27017"
@RoesWibowo
RoesWibowo / vhost-nginx.conf
Created April 28, 2016 06:19
Nginx virtual host + PHP 7
server {
listen 80;
server_name some.domain;
root /path/to/file;
index index.php index.htm index.html;
location ~ .php$ {
#try_files $uri =404;