ssh -R <port>:localhost:<port> <host_with_content> ffmpeg -i <input_file> -c:v libx264 -q 1 -c:a libmp3lame -f avi pipe:1 | nc localhost <port>
Playing:
{ | |
"name" : "rarst/install-test", | |
"description" : "Test project for WordPress stack via Composer", | |
"authors" : [ | |
{ | |
"name" : "Andrey Savchenko", | |
"homepage": "http://www.Rarst.net/" | |
} | |
], | |
"type" : "project", |
UPDATE <TABLE> SET | |
<COLUMN>=<RANGE_TYPE>( | |
lower(<COLUMN>), -- Swap out for actual value | |
upper(<COLUMN>), -- Swap out for actual value | |
concat( | |
CASE WHEN lower_inc(<COLUMN>) THEN '[' ELSE '(' END, | |
CASE WHEN upper_inc(<COLUMN>) THEN ']' ELSE ')' END | |
) | |
) | |
WHERE <CONDITION>; |
Principles of Adult Behavior
class NumericInput extends React.Component { | |
constructor(props = {}) { | |
super(props) | |
this.state = { | |
value: numeral(props.value).format('0,0') | |
} | |
} | |
onChange(e) { | |
var number = numeral().unformat(e.target.value) |
!! | |
!! Implementation of JSONPatch (http://jsonpatch.com/) using PostgreSQL >= 9.5 | |
!! | |
CREATE OR REPLACE FUNCTION jsonb_copy(JSONB, TEXT[], TEXT[]) RETURNS JSONB AS $$ | |
DECLARE | |
retval ALIAS FOR $1; | |
src_path ALIAS FOR $2; | |
dst_path ALIAS FOR $3; | |
tmp_value JSONB; |
/** | |
* Immutable move item | |
*/ | |
const move = (arr, from, to) => { | |
const clone = [...arr]; | |
Array.prototype.splice.call(clone, to, 0, | |
Array.prototype.splice.call(clone, from, 1)[0] | |
); | |
return clone; | |
}; |