Title: A bit beyond Git basics: Q&A Date: 2013-10-04
git branch <my-branch>
This creates a new branch that points to whichever commit you're currently on. Remember though that it doesn't change your current branch – it only creates a new one.
; This macro allows you to use a fixed machine location for a tool change and probe. It works by | |
; probing twice, once to capture the position of the tool you're changing away from, and again to | |
; set the adjusted WCS offset of the tool you're changing to. | |
; Using the macro in practice: | |
; 1) Insert an M6 tool change command in your program, which will pause cncjs and allow you to | |
; execute this macro. | |
; 2) The router retracts to a safe height and moves to a pre-defined location for tool changes and | |
; probing, then pauses. | |
; 3) Turn off your router, set up your probe, and continue. This will probe to capture the position |
// V1 | |
var cache = {}; | |
function paths(rights, downs) { | |
var key = rights + ',' + downs; | |
if (cache[key]) return cache[key]; | |
if (rights === 0 || downs === 0) { | |
return 1; |
{ | |
"description": "The settings in this file are persisted server-side. This file is generated automatically. Editing it is not recommended. Modify SettingsToPersist.json to specify which settings are persisted.", | |
"files": [ | |
{ | |
"name": "Game.cfg", | |
"sections": [ | |
{ | |
"name": "Chat", | |
"settings": [ | |
{ |
Title: A bit beyond Git basics: Q&A Date: 2013-10-04
git branch <my-branch>
This creates a new branch that points to whichever commit you're currently on. Remember though that it doesn't change your current branch – it only creates a new one.
// Run with `node --harmony coro.js` | |
"use strict"; | |
const Promise = require('bluebird'); | |
// Takes a function*, `g`, that yields promises. | |
// Returns a promise that resolves to `g`'s eventual return value. | |
var coro = function(gStar) { | |
const pending = Promise.pending(); |
import zulip | |
import os | |
import json | |
client = zulip.Client(config_file='.config', verbose=True) | |
class TodoManager(object): | |
def __init__(self, client): | |
self.client = client | |
self.todo_file = ".todos" |
master
?// Possibly wacky and useless protocol experiment | |
var mapObj = function(obj, fn) { | |
var ret = {} | |
for (var k in obj) { | |
var temp = fn(k, obj[k]) | |
ret[temp[0]] = temp[1] | |
} | |
return ret | |
} |
// LazySeq(head, tailthunk) -> more to go | |
// LazySeq(head, new Empty) -> end of sequence | |
function LazySeq(head, tailthunk) { | |
this.head = head | |
this.tail = tailthunk | |
} | |
function Empty() {} | |
var empty = new Empty |