Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aocenas
aocenas / connect_hoc_full.tsx
Last active December 25, 2018 21:27
Connect HOC full
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>
export type GetProps<C> = C extends React.ComponentType<infer P> ? P : never
export type Matching<InjectedProps, DecorationTargetProps> = {
[P in keyof DecorationTargetProps]: P extends keyof InjectedProps
? InjectedProps[P] extends DecorationTargetProps[P]
? DecorationTargetProps[P]
: InjectedProps[P]
: DecorationTargetProps[P]
}
@aocenas
aocenas / expand_bookmark
Last active August 29, 2015 14:21
expand github to 100%
javascript:(function() {('.container').width('100%'); $('.repository-content').width('100%')})()
var log = function log (e) {
console.log(e);
};
var Promise = function () {
this.resolved = false;
this.resolvedValue = null;
this.rejected = false;
this.rejectedValue = null;
};
@aocenas
aocenas / main.js
Created November 19, 2012 14:40
code to scrape ranking data from foosball.sk
var fs = require('fs');
var request = require('request');
var jsdom = require('jsdom');
var iconv = require('iconv-lite');
var rankOpen =
'http://www.foosball.sk/sk/zebricky/?action=view&rank_name_id=513';
var data = {};