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
If this is happening in nodejs, it is due to the older version of nodejs. Update node by using, | |
1) Clear NPM's cache: | |
sudo npm cache clean -f | |
2) Install a little helper called 'n' | |
sudo npm install -g n | |
3) Install latest stable NodeJS version |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
# download xlsx writer here :XlsxWriter-0.7.7.tar.gz (md5) | |
#https://pypi.python.org/pypi/XlsxWriter#downloads | |
#extract and put to "lib" folder under root app directory | |
from cStringIO import StringIO | |
import xlsxwriter | |
out = StringIO() | |
wb = xlsxwriter.Workbook(out, {'in_memory': True}) |
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
# set appengine_api to false on your gcloud environment | |
gcloud config set app/use_appengine_api false |
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
Covers configuration for NXLog installed on Windows, transfering to NXLog installed on Linux to LogStash. | |
NXLog is used for IIS logs. (http://nxlog-ce.sourceforge.net/) | |
Snare is used for Windows Event Logs. (http://www.intersectalliance.com/projects/SnareWindows/index.html#Download) |
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
<select name="tz" id="ae-timezone" title="Change the Timezone"> | |
<option value="US/Pacific"> | |
(GMT-7:00) | |
US/Pacific | |
</option> | |
<option value="UTC"> | |
(GMT+0:00) | |
UTC | |
</option> | |
<option value="Indian/Chagos" selected="selected"> |
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
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
function base64ArrayBuffer(arrayBuffer) { | |
var base64 = '' | |
var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
var bytes = new Uint8Array(arrayBuffer) | |
var byteLength = bytes.byteLength |
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
// unique id generator | |
function generateId(){ | |
var S4 = function () { | |
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); | |
}; | |
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
/* | |
* Name : Global Timer Script | |
* By: Sugar Ray Tenorio ([email protected]) | |
* 8/12/2012 1:01 AM | |
* dependencies : jQuery, Main Component | |
* http://www.javascriptph.com | |
******************************** | |
adding functions in Timer |
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
/* | |
DEFER OBJECT | |
- Mimic some parts of reactor on twistd python | |
AUTHOR : Sugar Ray Tenorio | |
METHODS : | |
defer._init : set / initialize variables | |
defer._run : start reactor |
NewerOlder