# rebase off master
git pull --rebase origin master`
# uncommit last files to re-add, useful to break one commit into multiple
git reset HEAD~
# squash etc, rebase (-i is an interactive rebase)
git checkout master
git pull
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 100 million simulations reveal of 63.1% chance of winning First Orchard. | |
*/ | |
const GREEN_APPLES = "green apples"; | |
const RED_APPLES = "red apples"; | |
const PLUMBS = "plumbs"; | |
const PEARS = "pears"; | |
const BASKET = "basket"; | |
const RAVEN = "raven"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
function App() { | |
const [todos, updateTodos] = useState([]); | |
const [currentTodo, updateTodo] = useState(""); | |
return ( | |
<div className="App"> | |
<h3>Todos</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myModule', []) | |
.factory('myModuleFactory', function() { | |
const state = { | |
loaded: false, | |
}; | |
const setLoaded = () => { | |
state.loaded = true; | |
}; | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import angular from 'angular'; | |
import assignIn from 'lodash/assignIn'; | |
const meServiceModule = angular.module('meServiceModule', []); | |
meServiceModule.factory('meService', ['$http', '$q', ($http, $q) => { | |
const user = {}; | |
const state = { | |
loaded: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Component = { | |
template: `...`, | |
bindings: { | |
userData: '<' | |
} | |
}; | |
angular | |
.module('App.pages.profile', [uiRouter, meServiceModule]) | |
.component('profile', Component) | |
.config(($stateProvider, $urlRouterProvider) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -- in app.component.js -- | |
import angular from 'angular'; | |
const AppComponent = { | |
template: ` | |
<app-header></app-header> | |
<app-nav></app-nav> | |
<div> | |
<div ui-view></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* usage: | |
* <stateless-table | |
* data="[{first_name: 'Aleck', last_name: 'Landgraf'}, ...]" | |
* on-header-click="sortData()" | |
* ></stateless-table> | |
*/ | |
module.component('statelessTable', { | |
bindings: { | |
data: '<', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>React StopWatch sample</title> | |
<meta name="viewport" content="width=device-width"> | |
<script src="http://fb.me/react-0.13.1.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.13.1.js"></script> | |
</head> | |
<body> | |
<script type="text/jsx"> | |
var StopWatch = React.createClass({ |
NewerOlder