Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
var page = new WebPage(), | |
address, output, size; | |
address = "http://www.metachunk.com/"; | |
width = 1024; height = 600; | |
output = "./screenshots/wat-"+width+"X"+height+".png"; | |
page.viewportSize = { width: width, height: height }; | |
if (phantom.args.length === 3 && phantom.args[1].substr(-4) === ".pdf") { |
#!/bin/bash | |
LINES=$(tput lines) | |
COLUMNS=$(tput cols) | |
declare -A snowflakes | |
declare -A lastflakes | |
clear |
// include the filesystem module | |
var fs = require('fs'); | |
// fs.readFile: read a file and all its contents, | |
// then call a callback function | |
fs.readFile('/some/file', function (err, contents) { | |
// if any error occurred, throw it | |
if (err) throw err; |
var fs = require('fs'); | |
// read a file | |
function read_the_file(filename, callback) { | |
// begin by reading a file | |
fs.readFile(filename, function (err, contents) { | |
// an error occurred, i.e. the file was not found. | |
// instead of throwing an error, skip the other |
// example function where arguments 2 and 3 are optional | |
function example( err, optionalA, optionalB, callback ) { | |
// retrieve arguments as array | |
var args = []; | |
for (var i = 0; i < arguments.length; i++) { | |
args.push(arguments[i]); | |
} | |
// first argument is the error object |
#!/bin/bash | |
############################################### | |
# To use: | |
# https://raw.github.com/gist/2776351/??? | |
# chmod 777 install_postgresql.sh | |
# ./install_postgresql.sh | |
############################################### | |
echo "*****************************************" | |
echo " Installing PostgreSQL" | |
echo "*****************************************" |
DROP FUNCTION IF EXISTS stripAlpha; | |
-- taken from http://stackoverflow.com/a/5146376 | |
delimiter // | |
create function stripAlpha(str varchar(50)) returns varchar(50) | |
no sql | |
begin | |
declare verification varchar(50); | |
declare result varchar(50) default ''; |
http://guides.rubyonrails.org/migrations.html
A warning occurred (42 apples) | |
An error occurred |