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
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: Alexander <estliberitas> Makarenko | |
| * Date: 04.01.13 | |
| * Time: 3:25 | |
| */ | |
| 'use strict'; | |
| var fs = require('fs') | |
| , net = require('net') |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>tableToExcel Demo</title> | |
| <script src="tableToExcel.js"></script> | |
| </head> | |
| <body> | |
| <h1>tableToExcel Demo</h1> | |
| <p>Exporting the W3C Example Table</p> |
| var fs = require('fs') | |
| , path = require('path') | |
| , _ = require('underscore'); | |
| var rootPath = "/path/to/remove"; | |
| removeDirForce(rootPath); | |
| // path should have trailing slash | |
| function removeDirForce(dirPath) { | |
| fs.readdir(dirPath, function(err, files) { |
| function getStyle(el, styleProp) { | |
| var value, defaultView = el.ownerDocument.defaultView; | |
| // W3C standard way: | |
| if (defaultView && defaultView.getComputedStyle) { | |
| // sanitize property name to css notation (hypen separated words eg. font-Size) | |
| styleProp = styleProp.replace(/([A-Z])/g, "-$1").toLowerCase(); | |
| return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); | |
| } else if (el.currentStyle) { // IE | |
| // sanitize property name to camelCase | |
| styleProp = styleProp.replace(/\-(\w)/g, function(str, letter) { |