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
$.fn.serializeObject = function () { | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function () { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); | |
} else { |
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
<!-- Append to pom.xml --> | |
<dependency> | |
<groupId>com.thetransactioncompany</groupId> | |
<artifactId>cors-filter</artifactId> | |
<version>1.8</version> | |
</dependency> | |
<!-- Append to web.xml --> | |
<filter> |
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
function getTimestamp () { | |
var date = new Date(); | |
var year = date.getFullYear(); | |
var month = (date.getMonth() + 1) + ''; | |
var day = date.getDate() + ''; | |
var hr = date.getHours() + ''; | |
var min = date.getMinutes() + ''; | |
var sec = date.getSeconds() + ''; | |
var ms = date.getMilliseconds() + ''; |
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
.DS_Store | |
.lock-wscript | |
.komodotools | |
.classpath | |
.settings | |
.project | |
.dropbox | |
.tmproj | |
.grunt | |
.cache |
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
function s4() { | |
return Math.floor((1 + Math.random()) * 0x10000) | |
.toString(16) | |
.substring(1); | |
}; | |
function guid() { | |
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + | |
s4() + '-' + s4() + s4() + s4(); | |
} |
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/sh | |
echo "\n Killing the cat..." | |
/etc/init.d/tomcat7 stop | |
echo "\n Removing internal organs..." | |
rm -rf /var/lib/tomcat7/webapps/ROOT | |
rm -rf /var/lib/tomcat7/webapps/ROOT.war | |
echo "\n Placing new organs..." |
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
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) { | |
text-shadow: @string; | |
} | |
.box-shadow (@string) { | |
-webkit-box-shadow: @string; | |
-moz-box-shadow: @string; | |
box-shadow: @string; | |
} |
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
apt-get install vim nginx php5-fpm php5-xcache | |
php5-sqlite sqlite3 | |
php5-mysql mysql-server mysql-client | |
vim /etc/nginx/nginx.conf | |
----------------------------------------------------------------------------- | |
server_tokens off; | |
----------------------------------------------------------------------------- | |
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
apt-get install vim python g++ make checkinstall | |
src=$(mktemp -d) && cd $src | |
wget -N http://nodejs.org/dist/node-latest.tar.gz | |
tar xzvf node-latest.tar.gz && cd node-v* | |
./configure |
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
apt-get install vim redis-server | |
vim /etc/redis/redis.conf | |
----------------------------------------------------------------------------- | |
bind 0.0.0.0 | |
----------------------------------------------------------------------------- | |
appendonly yes | |
----------------------------------------------------------------------------- | |
vim /etc/sysctl.conf |
OlderNewer