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 bash | |
# | |
# Nginx - new server block | |
# http://rosehosting.com | |
# Functions | |
ok() { echo -e '\e[32m'$1'\e[m'; } # Green | |
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; } | |
# Variables |
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 bash | |
# | |
# Install Automatically Node JS v 0.10 | |
# by Billy Riantono - billy[ at ]riantono.com | |
# Variables | |
NODE_INSTALL_DIR='/opt/nodejs/' | |
NODE_DOWNLOAD_URL='http://nodejs.org/dist/v0.10.31/node-v0.10.31-linux-x64.tar.gz' | |
#function |
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
interface=tap_soft | |
dhcp-range=tap_soft,192.168.100.50,192.168.100.60,24h | |
dhcp-option=tap_soft,3,192.168.100.1 | |
dhcp-option=tap_soft,option:dns-server,165.21.83.88,165.21.100.88 |
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
<html ng-app='app'> | |
<head> | |
<title>Hello World Angular</title> | |
<script src="yourjavascriptfolder/angular.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<h1>{{hello}}</h1> | |
</body> | |
</html> |
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
angular.module('myApp.stringFormat',[]) | |
.factory('stringFormat', function () { | |
var stringFormat = {}; | |
stringFormat.formatString = function(format,values){ | |
var result = ''; | |
for (var i = 0; ; ) { | |
// Find the next opening or closing brace | |
var open = format.indexOf('{', i); |
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 | |
# squid This shell script takes care of starting and stopping | |
# Squid Internet Object Cache | |
# | |
# chkconfig: - 90 25 | |
# description: Squid - Internet Object Cache. Internet object caching is \ | |
# a way to store requested Internet objects (i.e., data available \ | |
# via the HTTP, FTP, and gopher protocols) on a system closer to the \ | |
# requesting site than to the source. Web browsers can then use the \ | |
# local Squid cache as a proxy HTTP server, reducing access time as \ |
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
########################################################### | |
# Squid_LUSCA configuration Starts from Here ... # | |
# Thanks to some Indoensian friends for sharing Configs # | |
# Syed.Jahanzaib / 22nd April, 2014 # | |
# https://aacable.wordpress.com / aacable@hotmail.com # | |
########################################################### | |
# HTTP Port for SQUID Service | |
http_port 143 transparent | |
server_http11 on |
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 | |
# | |
# Apply Optimize for Sysctl v 0.10 | |
# by Billy Riantono - billy[ at ]riantono.com | |
#get optimalization config for sysctl | |
wget https://gist.githubusercontent.com/kotekalabs/657dad656248d774259d/raw/5619fbbcbde469e8645564629966ea223e3722b4/optimize-sysctl.conf | |
#applied the config to sysctl.conf | |
cat optimize-sysctl.conf >> /etc/sysctl.conf |
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 | |
# Simpler Script to running Siege | |
# by Billy Riantono - billy[ at ]riantono.com | |
#function | |
ok() { echo -e '\e[32m'$1'\e[m'; } # Green | |
#Download Siege | |
ok "Checking Siege ...." | |
if [ ! -f /usr/bin/siege ]; then |
OlderNewer