This file contains hidden or 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
# Project Euler Algorithems | |
#!/usr/bin/python3 | |
import time | |
def Euler1(): | |
numbers = [n for n in range(0, 1000) if n % 3 == 0 or n % 5 == 0] | |
return sum(numbers) | |
This file contains hidden or 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
# [pivital-story-id]-[feature-name] | |
# All lowercase. Spaces replaced with dashes | |
94198518-cs-block-bugs |
This file contains hidden or 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
# ..just merged dev into stage | |
git checkout stage | |
# on branch stage. We have a few blockers: we don't want commits 1234-my-feature [1a613sa] and 1234-my-feature-updated [2u817n0] | |
git revert -n 1a613sa | |
git revert -n 2u817n0 | |
git commit -m "... Except commits 1234-my-feature and 1234-my-feature-updates" | |
# The commits will now be excluded and can be fixed later | |
# Push | |
git push |
This file contains hidden or 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, { Component } from 'react'; | |
const withDeferRender = Presentational => | |
class DeferRender extends Component { | |
state = { | |
shouldRender: false, | |
}; | |
componentDidMount() { | |
window.requestAnimationFrame(() => { |
This file contains hidden or 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 * as React from "react"; | |
import * as ReactDOM from "react-dom"; | |
import gql from "graphql-tag"; | |
import { graphql } from "react-apollo"; | |
/** | |
* Using intersection types, we can allow our `graphql` injected props | |
* to be defined in our `Props` type. | |
*/ |
This file contains hidden or 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
Writeback | |
Idle* | |
START_WRITEBACK -> Verify | |
Verify | |
VerifyPending | |
VERIFY_FAIL -> VerifyError | |
VERIFY_SUCCEED -> Send | |
VerifyError | |
VERIFY -> VerifyPending | |
VERIFY_CANCEL -> Idle |
This file contains hidden or 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
// put me in your global.d.ts file | |
declare module 'react' { | |
/** | |
* Returns a stateful value, and a function to update it. | |
*/ | |
function useState<TValue>( | |
initialState: TValue | (() => TValue) | |
): [TValue, (value: TValue | ((prevValue: TValue) => TValue)) => void]; |
This file contains hidden or 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or 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
Machine({ | |
context: { | |
entryType: null, | |
isPending: false, | |
isDropping: false, | |
dropStatus: 'idle', | |
formError: null, | |
locationId: null, | |
practiceId: null, | |
practices: [], |
This file contains hidden or 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
OlderNewer