Skip to content

Instantly share code, notes, and snippets.

View starlocke's full-sized avatar
:shipit:
Guaranteed to work behind the scenes, so you don't have to!

Victor Yap starlocke

:shipit:
Guaranteed to work behind the scenes, so you don't have to!
View GitHub Profile
let http = require('http');
(function follow(url){
url = url.indexOf('?') !== -1 ? url.replace(/\?/,'.json?') : url + '.json';
http.get(url, response => {
let rawData = '';
response.on('data', data => {
rawData += data;
});
response.on('end', data => {
@starlocke
starlocke / 99-sites-enabled.conf
Created January 5, 2016 00:47 — forked from mklooss/99-sites-enabled.conf
lighttpd sites enabled
# File in: /etc/lighttpd/conf-available/99-sites-enabled.conf
include_shell "/usr/local/share/lighttpd/include-sites-enabled.pl"
@starlocke
starlocke / IEUserAgentTest.html
Last active August 29, 2015 14:27 — forked from jasongaylord/IEUserAgentTest.html
A sample JavaScript file to detect IE compatibility mode and version. This is not recommended unless absolutely needed as features should be detected instead.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Testing IE Compatibility Mode</title>
<script src="ieUserAgent.js" type="text/javascript"></script>
</head>
<body>
<div id="results">Results:</div>
<script type="text/javascript">
var val = "IE" + ieUserAgent.version;
zi() {
if [[ ! -z $1 ]]; then
steps=$1;
SIZE=`grep 'FontName' ~/.config/Terminal/terminalrc | cut -d' ' -f 2`
NEWSIZE=$((SIZE + steps))
REGEXPR='s/FontName.*/FontName=Monospace '$NEWSIZE'/g'
sed -i "$REGEXPR" ~/.config/Terminal/terminalrc
else
echo "Usage: zi [zoom steps]";
fi;