This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
/* This is a technique to lazy load your javascript files | |
* Handy for those pesky slow, load blocking off-site scripts | |
* function lazyLoad | |
* @s: String of path to file | |
*/ | |
function lazyLoad(s) { | |
var d = window.document, | |
b = d.body, /* appends at end of body, but you could use other methods to put where you want */ | |
e = d.createElement("script"); |
var os = require("os"); | |
//Create function to get CPU information | |
function cpuAverage() { | |
//Initialise sum of idle and time of cores and fetch CPU info | |
var totalIdle = 0, totalTick = 0; | |
var cpus = os.cpus(); | |
//Loop through CPU cores |
// WebKit font-smoothing | |
//------------------------------------------------ | |
// References: | |
// | |
// 1. http://maxvoltar.com/sandbox/fontsmoothing/ | |
// 2. http://maxvoltar.com/archive/-webkit-font-smoothing | |
// | |
// Values: none, antialiased (default), subpixel-antialiased | |
// |
#!/usr/bin/env python | |
#install the follow first: | |
#sudo easy_install pip | |
#sudo pip install -U boto | |
#sudo pip install configparser |
<figure class="quote"> | |
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote> | |
</figure> |
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(function(){ |
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
var myApplication = {}; | |
myApplication.instance = (function() { | |
var i = { | |
msg : "Hello world!", | |
hello : function() { | |
alert(i.msg); | |
} | |
}; | |