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
var xhr = new XMLHttpRequest(); | |
xhr.open('get', url, true); | |
xhr.onreadystatechange = function() { | |
// Here we check the status of the readyState property | |
switch(this.readyState) { | |
case 200: | |
case 202: | |
onSuccess(this.responseText); | |
break; |
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
Access-Control-Allow-Origin: http://www.example.com |
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
try { | |
xhr.open(method, url, true); | |
} catch (e) { | |
if (window.XDomainRequest) { | |
// Fallback to XDomainRequest | |
var xdr = new XDomainRequest(); | |
xdr.open("get", url); | |
xdr.onload = function() { | |
// Completed request, here we can access to the body of the response |
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
ctrl+w :setw synchronize-panes |
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
# @see http://guide.python-distribute.org/pip.html | |
# Install package from remote repository | |
pip install -e svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev | |
# Install package from local checkout | |
pip install -e path/to/repo |
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
cut -d ' ' -f7 /var/log/apache2/access.log > urls.txt | |
siege -c<concurreny rate> -b -f urls.txt |
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
# client machine | |
nc -uv servname 7000 | |
# server | |
nc -ulvp 7000 |
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
git checkout -b feature-branch source-branch |
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
/** | |
* @var Array _cache | |
*/ | |
this._cache = []; | |
/** | |
* @param String category | |
* @param String key | |
* @param Mixed value | |
*/ |
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
scp -l kbits |
OlderNewer