Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` | 
| license: apache-2.0 | 
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket | 
| /** | |
| * follows a path on the given data to retrieve a value | |
| * | |
| * @example | |
| * var data = { foo : { bar : "abc" } }; | |
| * followPath(data, "foo.bar"); // "abc" | |
| * | |
| * @param {Object} data the object to get a value from | |
| * @param {String} path a path to a value on the data object | |
| * @return the value of following the path on the data object | 
| var http = require("http"); | |
| var url = require("url"); | |
| var fs = require("fs"); | |
| var port = process.argv[2] || 8080; | |
| var contentTypes = { | |
| 'ico': 'image/x-icon', | |
| 'html': 'text/html', | |
| 'js': 'application/javascript', | |
| 'json': 'application/json', | 
| <!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> | 
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| 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 = []; | 
| #!/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 |