Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
var fs = require('fs'), | |
http = require('http'), | |
https = require('https'), | |
httpProxy = require('http-proxy'); | |
var options = { | |
https: { | |
key: fs.readFileSync('key.pem', 'utf8'), | |
cert: fs.readFileSync('cert.pem', 'utf8') | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>D3: Subselection Example</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<style type="text/css"> | |
body { | |
font: 13px sans-serif; |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=yes" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap</title> | |
<script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script> | |
<script type="text/javascript" charset="utf-8" src="video.js"></script> | |
<script type="text/javascript"> | |
Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
// -------------------------------------------------- | |
// Flexbox LESS mixins | |
// The spec: http://www.w3.org/TR/css3-flexbox | |
// -------------------------------------------------- | |
// Flexbox display | |
// flex or inline-flex | |
.flex-display(@display: flex) { | |
display: ~"-webkit-@{display}"; | |
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox |
#!/bin/sh | |
## Node.js for Raspberry Pi Packaging Script | |
## ========================================= | |
## Execute this script from within node.js git repo | |
## Use like this: | |
## ~/node/$ VERSION=v0.10.0 ./buildnode.sh | |
if [ -z $VERSION ]; then | |
echo "set the VERSION first" | |
exit 1 |
var ipp = require('ipp'); //get it from there - https://npmjs.org/package/ipp - $npm install ipp | |
var request = require('request'); //get it from there - https://npmjs.org/package/request - $npm install request | |
var fs = require('fs'); | |
function getPrinterUrls(callback) { | |
var CUPSurl = 'http://localhost:631/printers';//todo - change of you have CUPS running on other host | |
request(CUPSurl, function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
var printersMatches = body.match(/<TR><TD><A HREF="\/printers\/([a-zA-Z0-9-^"]+)">/gm);//i know, this is terrible, sorry( | |
var printersUrls = []; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>title</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<h1>Hello, world</h1> | |
<script src="http://code.jquery.com/jquery.js"></script> |