Download from here:
MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to:
sudo apt-get update && sudo apt-get install git-core curl build-essential openssl libssl-dev | |
git clone https://github.com/joyent/node.git | |
cd node | |
# 'git tag' shows all available versions: select the latest stable. | |
git checkout 0.10.17 | |
# Configure seems not to find libssl by default so we give it an explicit pointer. | |
# Optionally: you can isolate node by adding --prefix=/opt/node |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
## The Problem | |
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.) | |
## The temptingly easy but ultimately wrong solution: | |
Alter the port the script talks to from 8000 to 80: | |
}).listen(80); |
Download from here:
MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to:
var db = require('ezseed-database').db | |
var spawn = require('child_process').spawn | |
var logger = require('ezseed-logger')('stream') | |
var fs = require('fs') | |
var debug = require('debug')('ezseed:stream') | |
var which = require('which') | |
var config = require('./config') | |
//sizes: https://www.ffmpeg.org/ffmpeg-utils.html | |
const FFMPEG = [ |
var objectToQueryString = function (a) { | |
var prefix, s, add, name, r20, output; | |
s = []; | |
r20 = /%20/g; | |
add = function (key, value) { | |
// If value is a function, invoke it and return its value | |
value = ( typeof value == 'function' ) ? value() : ( value == null ? "" : value ); | |
s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value); | |
}; | |
if (a instanceof Array) { |
Can't share the complete code because the app's closed source and still in stealth mode, but here's how I'm using React Router and Redux in a large app with server rendering and code splitting on routes.
addReducers()
callback available to the getComponents()
method of
each React Router route. Each route is responsible for adding any Redux
reducers it needs when it's loaded. (This isn't really necessary on thetouchpad_id=$(xinput --list | grep "TouchPad" | xargs -n 1 | grep "id=" | sed 's/id=//g') | |
accel_speed_code=$(xinput --list-props $touchpad_id | awk '/Accel Speed \(/ {print $4}' | grep -o '[0-9]\+') | |
# Default acceleration is too slow (non-existent) | |
xinput --set-prop $touchpad_id $accel_speed_code .75 |
This might be handy if you have an SVG file that you want to use as, say, a mask for a generative algorithm.
Place the SVG file in the same directory that you are running penplot from.