Skip to content

Instantly share code, notes, and snippets.

export class Login {}
export class Logout {}
interface LoginNavState {
showLoginOptions: boolean
}
class LoginNav extends React.Component<{}, LoginNavState> {
constructor() {
super()
this.state = {
showLoginOptions: false
132659 of 132656 total ( 100%)
Dropped 62 nodes (cum <= 663)
Showing top 10 nodes out of 19 (cum >= 24441)
flat flat% sum% cum cum%
49155 37.05% 37.05% 49155 37.05% syscall.anyToSockaddr
43191 32.56% 69.61% 67116 50.59% github.com/chihaya/chihaya/tracker.(*Tracker).HandleAnnounce
21847 16.47% 86.08% 21847 16.47% github.com/chihaya/chihaya/tracker/models.NewPeerKey
16385 12.35% 98.43% 16385 12.35% github.com/chihaya/chihaya/udp.(*Server).newAnnounce
2081 1.57% 100% 23928 18.04% github.com/chihaya/chihaya/tracker/models.(*PeerMap).Put
0 0% 100% 49155 37.05% github.com/chihaya/chihaya.func·002
@alihammad-gist
alihammad-gist / Gc
Last active August 29, 2015 14:24
chihaya
root@vps83-olr:~/chihaya/bin# GODEBUG=gctrace=1 ./chihaya -debug 0.0.0.0:6060 -config=config.json -logtostderr
gc1(1): 1+0+70+0 us, 0 -> 0 MB, 21 (21-0) objects, 2 goroutines, 15/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
gc2(1): 0+0+53+0 us, 0 -> 0 MB, 52 (53-1) objects, 3 goroutines, 20/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
gc3(1): 0+0+63+0 us, 0 -> 0 MB, 150 (169-19) objects, 4 goroutines, 24/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
gc4(1): 0+0+80+0 us, 0 -> 0 MB, 324 (392-68) objects, 4 goroutines, 32/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
gc5(1): 0+0+100+0 us, 0 -> 0 MB, 352 (458-106) objects, 4 goroutines, 39/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
gc6(1): 0+0+222+0 us, 0 -> 0 MB, 578 (734-156) objects, 9 goroutines, 50/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
I0707 23:43:41.788254 4386 debug.go:30] Starting debug HTTP on 0.0.0.0:6060
I0707 23:43:41.788385 4386 http.go:124] Starting HTTP on :6881
I0707 23:43:41.788461 4386 udp.go:9
type Route = {
route: string
label: string
};
type Item = (Route|Item)[];
type ItemValue = string | number
interface Item {
[key: string]: ItemValue | Data
}
type Data = Item[]
function takeData(d: Data) {
for (var i = 0; i < d.length; i++) {
///<reference path="tree.d.ts"/>
///<reference path="../../typings/tsd.d.ts"/>
type ReactElement = React.ReactElement<any>
type TreeItem = Tree.Item
/*
Same function signature as Tree.ItemReactElementFactory
(which is defined in tree.d.ts - gist is below)
*/
var e1: React.ReactElement<any> = React.DOM.li();
var e2: ReactWithAddons.ReactElement<any> = ReactWithAddons.DOM.li();
e1 = e2;
// produces error
// Error:(11, 1) TS2322: Type 'ReactElement<any>' is not assignable to type 'ReactElement<any>'.
@alihammad-gist
alihammad-gist / composer.json
Created December 8, 2015 09:20
Autoloading zf2 modules with composer
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2014%24bb917b85df9caebd44d09f44aab6d937bb75350df589883d5d
c222e3627eea41.json" file could not be downloaded: failed to open stream: HTTP request failed!