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
# Original version | |
PATH="/usr/local/sbin:${PATH}" | |
export PATH | |
# Load RVM into a shell session *as a function* | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
# Make global packages available to Node | |
export NODE_PATH="/usr/local/lib/node_modules" |
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
## Subsitute "SERVER" with your server app and "FILE" with your filename | |
if [ ! -d ./logs ]; then | |
mkdir logs | |
fi | |
SERVER FILE 2> ./logs/server-crash.last | |
printf '\n On ' >> ./logs/server-crash.last | |
echo `date` >> ./logs/server-crash.last | |
printf '\n------------------------------------\n' >> ./logs/server-crash.last | |
cat ./logs/server-crash.last | tee -a ./logs/server-crash.log |
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
# Execute this script as root user # | |
#--- Check that system is up to date ---# | |
apt-get update | |
apt-get upgrade | |
#--- Install desired software ---# | |
apt-get install sudo |
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
## Subsitute text between ** with correct values | |
# the IP(s) on which your server is running. | |
upstream *nameforservice* { | |
server 127.0.0.1:*yourport* max_fails=0 fail_timeout=10s; | |
keepalive 512; | |
} | |
# the nginx server instance | |
server { |
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
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file and a complete list of statements and | |
## options, please have a look in the Monit manual. |
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
[PHP] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
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
/*CSS Responsive design show-hide*/ | |
/* | |
USAGE | |
The class "res" has two modes, "show" and "hide". | |
The intended direction is from a larger to a smaller device. | |
Assign the class "res-show" to any HTML tag when you want the wrapped content | |
to be hidden on larger devices and shown on smaller ones. |
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
## Place this file in "/etc/sysctl.d/network-tuning.conf" and | |
## run "sysctl -p" to have the kernel pick the new settings up | |
# Avoid a smurf attack | |
net.ipv4.icmp_echo_ignore_broadcasts = 1 | |
# Turn on protection for bad icmp error messages | |
net.ipv4.icmp_ignore_bogus_error_responses = 1 | |
# Turn on syncookies for SYN flood attack protection |
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 | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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
# Tab autocomplete settings for "~$/.inputrc" | |
set completion-ignore-case on | |
set show-all-if-ambiguous on | |
TAB: menu-complete |
OlderNewer