Skip to content

Instantly share code, notes, and snippets.

{
"goalTreeString": "{\"branches\":{\"main\":{\"target\":\"C2\",\"id\":\"main\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"}},\"tags\":{},\"HEAD\":{\"target\":\"main\",\"id\":\"HEAD\"}}",
"solutionCommand": "git commit ",
"startTree": "{\"branches\":{\"main\":{\"target\":\"C1\",\"id\":\"main\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"}},\"tags\":{},\"HEAD\":{\"target\":\"main\",\"id\":\"HEAD\"}}",
"name": {
"en_US": "demo level"
},
"hint": {
"en_US": "heres a hint"
},
{
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"o/master\":{\"target\":\"C1\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"}},\"tags\":{},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"}},\"tags\":{},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}}",
"solutionCommand": "git branch -f master;git checkout master",
"startTree": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"o/master\":{\"target\":\"C1\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"par
{
"name": "LearnGitBranching",
"version": "0.8.0",
"dependencies": {
"backbone": {
"version": "1.1.2",
"from": "backbone@*",
"resolved": "https://registry.npmjs.org/backbone/-/backbone-1.1.2.tgz",
"dependencies": {
"underscore": {
var SQLite = require('react-native-sqlite');
var rethrowOr = require('../utils/rethrowOr');
var _dbToTables = {};
var DBInfo = {
getTables: function(database, callback) {
var dbName = database.getName();
if (_dbToTables[dbName]) {
componentWillMount() {
this._responder = PanOrTapResponder.create({
onPressIn: () => {
// Called after the ~30ms delay to make sure
// this gesture is not a pan but rather a tap.
this.setState({highlightUnderlay: true});
},
onPress: () => {
componentWillMount() {
this._panResponder = PanResponder.create({
onStartShouldSetPanResponder: () => true,
onMoveShouldSetResponderCapture: () => true,
onMoveShouldSetPanResponderCapture: () => true,
onPanResponderGrant: (e, {dx, dy}) => {
this.state.pan.setOffset({x: dx, y: dy});
this.state.pan.setValue({x: 0, y: 0});
var _ = require('underscore');
var fs = require('fs');
// Haha, this is so tricky. so we have a template for index.html to stick
// in the hashed JS and style files -- that template also contains
// templates used in the app. in order to avoid evaluating those
// templates, we change the regexes so we can effectively nest templates
_.templateSettings.interpolate = /\{\{(.+?)\}\}/g;
_.templateSettings.escape = /\{\{\{(.*?)\}\}\}/g;
_.templateSettings.evaluate = /\{\{-(.*?)\}\}/g;
@pcottle
pcottle / .gitconfig
Created December 5, 2012 17:40
gitconfig
[user]
name = Peter Cottle
email = petermcottle@gmail.com
[core]
editor = /usr/bin/vim -f
excludesfile = /Users/pcottle/.gitignore_global
[alias]
unstage = reset HEAD --
[help]
autocorrect = 1
@pcottle
pcottle / Custom.css
Created October 5, 2012 03:55 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
import multiAgents
class TrivialProblem(object):
""" make a tree that looks like this:
root (4)
/ \
min left (4) min right (2)
/ \ / \
4 3 2 deeper (1000)