Skip to content

Instantly share code, notes, and snippets.

View basoro's full-sized avatar

Basoro basoro

View GitHub Profile
@basoro
basoro / setup-centos-5.sh
Created April 5, 2016 23:03
Install script nginx, php55-fpm, mysql, vhost for 128mb vps for centos 5
#!/bin/bash
##############################
# disable un-needed services #
##############################
service httpd stop 
chkconfig httpd off
service xinetd stop
chkconfig xinetd off
service saslauthd stop
map $uri $blogname{
~^(?P<blogpath>/[^/]+/)files/(.*) $blogpath ;
}
map $blogname $blogid{
default -999;
#Ref: http://wordpress.org/extend/plugins/nginx-helper/
#include /var/www/wordpress/wp-content/plugins/nginx-helper/map.conf ;
}
Turn Your Windows PC into a Wi-Fi Hotspot from the Command Line
@basoro
basoro / setup-centos6.sh
Last active June 26, 2018 05:04
Fast and Dirty Nginx, PHP-FPM 5.6 and MySQL 5.5 for Centos 6.x
#!/bin/bash
###################
# disable selinux #
###################
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g'/etc/selinux/config
##############################
#!/bin/bash
if [ -z "$1" ]
then
echo "Usage: setup-vhost <hostname> (without the www. prefix)"
exit
fi
# Checking Permissions and making directorys
mkdir "/var/www/$1"
@basoro
basoro / nginx-php-mysql-from-source
Created July 10, 2018 22:42
Configure Nginx, PHP-FPM, MySQL from source
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#set the password of mysql
echo "========================================="
mysqlrootpwd="root"
echo "Please input the root password of mysql:"
read -p "(Default password: root):" mysqlrootpwd
if [ "$mysqlrootpwd" = "" ]; then
@basoro
basoro / centos6-khanza.sh
Last active March 17, 2019 10:47
Cara mudah instalasi Server SIMRS Khanza di Linux Centos 6 Minimal.
#!/bin/bash
#####################################
# SILAHKAN SESUAIKAN YG DIBAWAH INI #
# User : admin #
# Pass : nimda #
#####################################
printf "admin:$(openssl passwd -crypt nimda)\n" >> ~/.htpasswd
###################
<?php
/**
* H3K | Tiny File Manager
* CCP Programmers
* http://fb.com/ccpprogrammers
* https://github.com/prasathmani/tinyfilemanager
*/
// Default language
$lang = 'en';
apt-get install software-properties-common python-software-properties
add-apt-repository 'deb http://packages.dotdeb.org wheezy-php56 all'
add-apt-repository 'deb-src http://packages.dotdeb.org wheezy-php56 all'
~~~~~~~~~~~~ jessy
add-apt-repository 'deb http://packages.dotdeb.org jessie all'
add-apt-repository 'deb-src http://packages.dotdeb.org jessie all'
~~~~~~~~~~~~
wget http://www.dotdeb.org/dotdeb.gpg
@basoro
basoro / tiger-vnc.rb
Last active February 19, 2019 15:46
wut
class TigerVnc < Formula
homepage "http://tigervnc.org/"
url "https://github.com/TigerVNC/tigervnc/archive/v1.9.0.tar.gz"
sha256 "f15ced8500ec56356c3bf271f52e58ed83729118361c7103eab64a618441f740"
depends_on "cmake" => :build
depends_on "gnutls" => :recommended
depends_on "jpeg-turbo"
depends_on "gettext"
depends_on :x11