Skip to content

Instantly share code, notes, and snippets.

@identityclash
identityclash / client.js
Created November 11, 2015 06:13
nssocket memory leak
var nssocket = require('nssocket');
var client = new nssocket.NsSocket();
client.on('start', function () {
console.log('connected');
});
client.on('close', function () {
console.log('disconnected');
});
@identityclash
identityclash / dropbox_conflict_clean.sh
Created November 11, 2015 06:13 — forked from genediazjr/dropbox_conflict_clean.sh
delete all dropbox conflicts
cd dropbox
find . -type f -name "* conflicted *" -exec rm -f {} \;
[Collections]
each - error or no return;
map - return transformed values in array;
filter - return those that has passed;
reject - removes the values that have passed;
reduce - returns one value based on array values;
detect - returns first passed;
sortBy - returns sorted by a numeric value;
some - return true if one satisfies iterator;
every - return true if all satisfies iterator;
@identityclash
identityclash / debian-time-sync.sh
Created November 11, 2015 06:13 — forked from genediazjr/debian-time-sync.sh
Keep server time updated
sudo apt-get install ntp
sudo nano /etc/ntp.conf
logfile /var/log/xntpd
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
@identityclash
identityclash / ISO3166-2.json
Created November 11, 2015 06:13 — forked from genediazjr/ISO3166-2.json
ISO 3166-2 Countries and smallest units (WIP)
{
"AD": {
"label": "Andorra",
"units": [
{
"code": "AD-07",
"label": "Escut d'Andorra la Vella.svg Andorra la Vella"
},
{
"code": "AD-02",
@identityclash
identityclash / ixgbevf-upgrade.sh
Created November 11, 2015 06:13
ixgbevf 2.16.1 upgrade for AWS EC2 SR-IOV "Enhanced Networking" on Ubuntu 14.04 (Trusty) LTS
ssh ubuntu@n.n.n.n "bash -s -x" -- <ixgbevf-upgrade.sh
.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;
}
@identityclash
identityclash / debian-nginx-php.sh
Created November 11, 2015 06:11 — forked from genediazjr/debian-nginx-php.sh
Nginx w/ PHP on Debian
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;
-----------------------------------------------------------------------------
@identityclash
identityclash / debian-nodejs.sh
Created November 11, 2015 06:10 — forked from genediazjr/debian-nodejs.sh
Nodejs on Debian
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
@identityclash
identityclash / debian-tomcat.sh
Created November 11, 2015 06:10 — forked from genediazjr/debian-tomcat.sh
Tomcat port 80 on Debian
apt-get update
apt-get upgrade
apt-get install vim make g++ openjdk-7-jdk tomcat7 fastjar unzip
cd /usr/share/tomcat7/lib/
-----------------------------------------------------------------------------
jar xf catalina.jar org/apache/catalina/util/ServerInfo.properties
server.info=Apache