mkdir ~/opengl-minimal
cd ~/opengl-minimal
Use the first example in https://wiki.wxwidgets.org/WxGLCanvas
runner.dialect = scala3 | |
runner.dialectOverride.allowSignificantIndentation = false | |
# allows `if x then y` | |
runner.dialectOverride.allowQuietSyntax = true |
mkdir ~/opengl-minimal
cd ~/opengl-minimal
Use the first example in https://wiki.wxwidgets.org/WxGLCanvas
When I use docker to work with the shared workspace with host under Ubuntu, I find that files created by docker user is owned by root. This is not the same with macOS.
Maybe this is becuase docker is run by root user and the default user mapping mechanism is to map container-root to host-user or host-root. So can I map the container-root or container-any-user to host-current-user?
Fortunately the latest docker supports the re-map the container user to any host user via Linux namespace. Refer to this.
;; Re-render when Figwheel reloads. | |
(gevents/listen js/document.body | |
"figwheel.js-reload" | |
(fn [] | |
(let [root-component (om-next/app-root (compassus/get-reconciler a))] | |
(letfn [(js-vals [o] | |
(map #(aget o %) (js-keys o))) | |
;; Finds the children of a React internal instance of a component. | |
;; That could be a single _renderedComponent or several | |
;; _renderedChildren. |
const Rx = require('rx'); | |
const R = require('ramda'); | |
const seq = Rx.Observable.range(1, 10); | |
const isEven = (x) => x % 2 === 0; | |
const add1 = (x) => x + 1; | |
const transducer = R.compose( | |
R.map(add1), |
var Rx = require('rx'); | |
var R = require('ramda'); | |
var seq = Rx.Observable.range(1, 10); | |
var isEven = function isEven(x) { return x % 2 === 0; }; | |
var add1 = function add1(x) { return x + 1; }; | |
var transducer = R.compose(R.map(add1), R.filter(isEven)); | |
var source = seq.transduce(transducer); |
language: node_js | |
node_js: | |
- iojs | |
env: | |
global: | |
# https://docs.saucelabs.com/ci-integrations/travis-ci/ | |
# SAUCE_USERNAME | |
- secure: Daa... |
#!/bin/bash -eo pipefail | |
## Allows for creation of "Basic" DNS records in a Route53 hosted zone | |
function main() { | |
record_name=$1 | |
record_value=$2 | |
[[ -z $record_name ]] && echo "record_name is: $record_name" && exit 1 | |
[[ -z $record_value ]] && echo "record_value is: $record_value" && exit 1 |
(defn recursive-rule | |
"A recursive rule for establishing prototype inheritance/isa relationship. | |
Can specify a maximum depth to travel, or none if there are no restrictinos. | |
rule The name of the rule | |
e The entity | |
a The attribute | |
v The value | |
Should be creating the rule like: (recursive-rule 'isa '?e '?a '?v) | |
Then within a query, can refer to it like this: | |
(isa ?e :thing/isa ?v) " |
WITH table_scans as ( | |
SELECT relid, | |
tables.idx_scan + tables.seq_scan as all_scans, | |
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes, | |
pg_relation_size(relid) as table_size | |
FROM pg_stat_user_tables as tables | |
), | |
all_writes as ( | |
SELECT sum(writes) as total_writes | |
FROM table_scans |