The script:
/*global casper:true*/
var casper = require('casper').create({
pageSettings: {
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0"
}
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Foundation Project</title> | |
<meta charset="UTF-8"> | |
<link href="dist/css/style.css" rel="stylesheet"> | |
</head> | |
<body> | |
<?php | |
/** | |
* Get other templates (e.g. product attributes) passing attributes and including the file. | |
* | |
* @access public | |
* @param mixed $template_name | |
* @param array $args (default: array()) | |
* @param string $template_path (default: '') | |
* @param string $default_path (default: '') | |
* @return void */ |
#!/bin/bash | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
prop='profile_image_url' | |
picurl=`jsonval` |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |