start new:
tmux
start new with session name:
tmux new -s myname
| function decorate(tag, template) { | |
| customElements.define(tag, class extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({ mode: 'open' }); | |
| } | |
| connectedCallback() { | |
| let root = this.shadowRoot; | |
| if(!root.firstChild) { |
| /** | |
| * An approximate port of https://github.com/s-macke/VoxelSpace | |
| * using Kotlin and JavaFX. | |
| * | |
| * Run with : kotlinc -script voxel.kts | |
| * | |
| * Click on the panel to "fly". | |
| * | |
| * Twitter: @CedricChampeau | |
| */ |
| So as we bring closure on twenty-15 | |
| @grab your maven by its j-bean | |
| Swing those builders for a laugh | |
| But only on their own classpath | |
| Have you... | |
| Met a class with a trait? | |
| Got your binding way too late? | |
| Seen Elvis looking like ?: | |
| Or lost your way in recursion |
| // kills long running ops in MongoDB (taking seconds as an arg to define "long") | |
| // attempts to be a bit safer than killing all by excluding replication related operations | |
| // and only targeting queries as opposed to commands etc. | |
| killLongRunningOps = function(maxSecsRunning) { | |
| currOp = db.currentOp(); | |
| for (oper in currOp.inprog) { | |
| op = currOp.inprog[oper-0]; | |
| if (op.secs_running > maxSecsRunning && op.op == "query" && !op.ns.startsWith("local")) { | |
| print("Killing opId: " + op.opid |