Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# at the end | |
unset color_prompt force_color_prompt | |
export PS1='\[\033[01;33m\] \w\[\033[32m\] $(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] ' | |
bind '"\e[A": history-search-backward' | |
bind '"\e[B": history-search-forward' | |
source "$HOME/bin/custom-script.sh" |
(function() { | |
var log; | |
log = function(enable) { | |
if (log.enabled) { | |
log.history.push(arguments); | |
if (window.console) { | |
window.console.log.apply(window.console, Array.prototype.slice.call(arguments)); | |
} | |
} else if (enable === !void 0) { | |
log.enabled = enable; |
function Emitter (name) { | |
var emitter = this; | |
this.$name = name; | |
this.staticTriggeredBy = []; | |
this.staticTrigger = function () { | |
emitter.staticTriggeredBy.push({ $name: this.$name, name: this.name }); | |
console.log('[static] $name: ' + this.$name + ', name: ' + this.name); | |
console.log(JSON.stringify(emitter.staticTriggeredBy)); | |
}; | |
function _Emitter (name) { | |
this.callers = {}; | |
} | |
_Emitter.prototype.add = function () { | |
this.callers[this.name] = true; | |
}; | |
_Emitter.prototype.log = function () { | |
console.log(JSON.stringify(this.callers)); |
# with AJAX withCredentials=false (cookies NOT sent) | |
Header always set Access-Control-Allow-Origin "*" | |
Header always set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE" | |
Header always set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type" | |
RewriteEngine On | |
RewriteCond %{REQUEST_METHOD} OPTIONS | |
RewriteRule ^(.*)$ $1 [R=200,L,E=HTTP_ORIGIN:%{HTTP:ORIGIN}]] | |
# with AJAX withCredentials=true (cookies sent, SSL allowed...) | |
SetEnvIfNoCase ORIGIN (.*) ORIGIN=$1 |
#!/bin/bash | |
# slanger daemon | |
# chkconfig: 345 20 80 | |
# description: slanger daemon | |
# processname: slanger | |
. /etc/rc.d/init.d/functions | |
# Location of a non-daemon application to be daemonized | |
BIN="/home/xxx/.rvm/gems/ruby-1.9.2-p290/bin/slanger --app_key XXXX --secret YYYY --api_host 0.0.0.0:4568 --websocket_host 0.0.0.0:8081" |
[user] | |
name = Pavan Kumar Sunkara | |
email = [email protected] | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[sendemail] | |
smtpencryption = tls | |
smtpserver = smtp.gmail.com |
sha3-512 | |
answer: sha( question + sha(pass) ) | |
aes-psk: sha( sha(pass) + question ) | |
Authentication: Bearer {ACCESS_TOKEN} | |
X-Request: uuid.v4 | |
X-Signature: aes(request.uuid, aes-psk) | |
Payload: aes(payload, aes-psk) |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/bin/sh | |
# This script will install a Git pre-commit hook that stop accidental commits to master and develop branches. | |
# There is also a variant that includes a core.whitespace check. See pre-commit-2 below. | |
# Install in current Git repo: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/9059706/raw/install-pre-commit.sh | sh | |
# Install with core.whitespace check: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/9059706/raw/install-pre-commit.sh | sh -s pre-commit-2 | |
# Install with core.whitespace check and EOF-newline-check: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/9059706/raw/install-pre-commit.sh | sh -s pre-commit-3 | |
# Install only core.whitespace check: |