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
#!/usr/bin/python2.6 | |
import os.path | |
import json | |
import urllib2 | |
import BaseHTTPServer | |
import webbrowser | |
from urlparse import urlparse, parse_qs | |
from urllib import urlencode |
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
#!/usr/bin/env python | |
import os | |
import os.path | |
import json | |
import re | |
from mimetypes import guess_type | |
from optparse import OptionParser | |
SUPPORTED_TYPES = ('image/gif','image/jpeg','image/png','image/bmp','image/tiff') |
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 {connect} from 'react-redux'; | |
// redux and react-redux are great! Let's create a connected component that looks up firstName in the state | |
// note that the age prop still needs to be supplied to ConnectedWhatsMyAgeAgain | |
const ConnectedWhatsMyAgeAgain = connect( | |
(state:{user:{name:string}}) => ({ | |
firstName: state.user.name.split(' ')[0], | |
}) | |
)(WhatsMyAgeAgain); | |
function App() { |
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
function identity(a) { | |
return a; | |
} |
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
/* @flow */ | |
type IdentityFunc<A> = (a: A) => A; | |
declare var identity: IdentityFunc<number>; | |
const aNumber:number = identity(1); | |
const aString:string = identity("foo"); |
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
/* @flow */ | |
type IdentityFunc<A> = (a: A) => A; | |
declare var identity: IdentityFunc<mixed>; | |
const aNumber:number = identity(1); | |
const aString:string = identity("foo"); |
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
/* @flow */ | |
type IdentityFunc = <A>(a: A) => A; | |
declare var identity: IdentityFunc; | |
const aNumber:number = identity(1); | |
const aString:string = identity("foo"); |
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
// flow-typed signature: ba132c96664f1a05288f3eb2272a3c35 | |
// flow-typed version: c4bbd91cfc/redux_v3.x.x/flow_>=v0.33.x | |
declare module 'redux' { | |
/* | |
S = State | |
A = Action |
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
0x775fC81CBa62045E37987074B5C5675D42357ec0 |
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
0xfc45546bB62A57EbC96536fb8B58A0beb6c6cD44 |
OlderNewer