I hereby claim:
- I am tlivings on github.
- I am tlivings (https://keybase.io/tlivings) on keybase.
- I have a public key whose fingerprint is E48C BB26 792C 4030 552B 0DC0 CBE2 A2AD E973 A9BD
To claim this, I am signing this object:
| function mergePartials(partials) { | |
| const types = []; | |
| const resolvers = []; | |
| for (const partial of partials) { | |
| resolvers.push(partial.resolvers); | |
| Array.isArray(partial.types) ? types.push(...partial.types) : types.push(partial.types); | |
| } | |
| addEmptyRootTypes(types, resolvers); |
| 'use strict'; | |
| const Domain = require('domain'); | |
| const create = function (initialState = {}) { | |
| const domain = Domain.create(); | |
| domain.state = initialState; | |
| const enter = domain.enter; |
| const server = new RxServer(Http.createServer(), 3000); | |
| server.flatMap( | |
| //Read request content | |
| ({ request, response }) => { | |
| return request.toArray().map((body) => { | |
| request.payload = Buffer.concat(body); | |
| return {request, response}; | |
| }); | |
| } |
| wrk -c 30 -d 30s -t 30 http://127.0.0.1:8888 |
| let obj = { | |
| value: 1 | |
| }; | |
| Rx.Observable.fromObserving(obj).filter((change) => change.name === 'value').doOnNext((x) => console.log(x)).subscribe(); | |
| obj.value = 2; |
| //Uses the haversine formula. | |
| -(double) distanceFromCLLocation:(CLLocation*)location { | |
| double result; | |
| double earthRadius = 3959; //miles | |
| double latDelta = (location.coordinate.latitude - self.latitude.doubleValue) * (M_PI/180); | |
| double lonDelta = (location.coordinate.longitude - self.longitude.doubleValue) * (M_PI/180); | |
| double lat1 = self.latitude.doubleValue * (M_PI/180); |
| var scripts = document.getElementsByTagName('script'); | |
| var myScript = scripts[ scripts.length - 1 ]; | |
| var queryString = myScript.src.replace(/^[^\?]+\??/,''); | |
| var params = parseQuery( queryString ); | |
| function parseQuery ( query ) { | |
| var Params = new Object (); | |
| if ( ! query ) return Params; | |
| // return empty object |
| - (void) authenticateLocalPlayer { | |
| GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; | |
| [localPlayer authenticateWithCompletionHandler:^(NSError *error) { | |
| if (localPlayer.isAuthenticated) { | |
| //Maybe do something | |
| } | |
| }]; | |
| } |
I hereby claim:
To claim this, I am signing this object:
| 'use strict'; | |
| function Trie() { | |
| this.children = {}; | |
| } | |
| Trie.prototype = { | |
| search: function (str) { | |
| var current = this; |