The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
| var PRINT = false; | |
| var LOG = 1; | |
| var SEL = ".pin"; | |
| var COND = function($node) { | |
| var ret = true; | |
| ret = checkNum($node, ".pinPrice", ">=", 10); | |
| if (!ret) { return false; } |
| #! /bin/sh | |
| # Init. script for phantomjs, based on Ubuntu 12.04 skeleton. | |
| # Author: Anthony Lapenna <lapenna.anthony@gmail.com> | |
| PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
| DESC="Phantomjs service" | |
| NAME=phantomjs | |
| DAEMON=/usr/bin/$NAME | |
| PIDFILE=/var/run/$NAME.pid | |
| SCRIPTNAME=/etc/init.d/$NAME |
| node_modules | |
| build | |
| *.min.js |
| function addAllResourcesLoadedCallback(page, timeout) { | |
| function debug(text) { | |
| if (typeof page.onDebug == "function") { | |
| page.onDebug(text); | |
| } | |
| } | |
| var counter = [], timer; | |
| timeout = timeout || 2000; |
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| #!/bin/bash | |
| # | |
| # Creates a signed and zipaligned APK from your Ionic project | |
| # | |
| # Place your keystore in the root of your project and name it <company>.keystore | |
| # Use this script as following : | |
| # $ ./release.sh [company] [version] | |
| # | |
| # Don't forget to gitignore your key and your compiled apks. | |
| # |
In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.
AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist
| <?php | |
| function getHead($urls){ | |
| $results = array(); | |
| // make sure the rolling window isn't greater than the # of urls | |
| $rolling_window = 5; | |
| $rolling_window = (sizeof($urls) < $rolling_window) ? sizeof($urls) : $rolling_window; | |
| $master = curl_multi_init(); | |
| // $curl_arr = array(); |