I hereby claim:
- I am swissmanu on github.
- I am alabor (https://keybase.io/alabor) on keybase.
- I have a public key whose fingerprint is A212 B280 96E1 A486 30FD 88F3 9BEB FCA1 04E4 AEA3
To claim this, I am signing this object:
< HTTP/1.1 302 Found | |
< Content-Length: 34 | |
< Content-Type: text/html; charset=utf-8 | |
< Date: Wed, 05 Dec 2018 09:32:46 GMT | |
< Location: /user/login | |
< Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647 | |
< Set-Cookie: i_like_gogs=346ffxxxxxxxae8b; Path=/; HttpOnly | |
< Set-Cookie: _csrf=Pka0s5RZO-QhdGetTwxxxxxxxxxxNjcxxxxxxx3D%3D; Path=/; Expires=Thu, 06 Dec 2018 09:32:46 GMT; HttpOnly | |
< Set-Cookie: redirect_to=%252Fuser%252Frepos; Path=/ |
// setState signature borrowed from react 😇 | |
interface WithStateProps<S> { | |
initialState: S; | |
children: ( | |
state: S, | |
setState: <K extends keyof S>( | |
state: ((prevState: Readonly<S>, props: {}) => Pick<S, K> | S | null) | (Pick<S, K> | S | null), | |
callback?: () => void | |
) => void | |
) => React.ReactChild; |
{ | |
"data": [ | |
{ | |
"id": { | |
"@type": "g:Int64", | |
"@value": 12336 | |
}, | |
"label": "vertex", | |
"inE": { | |
"relates": [ |
// Example Usage: | |
eventually(20)(() => fetch('http://i.fail.often.com/data.json')) | |
.then(data => console.log(data)) | |
.catch(e => console.log(e)); | |
function eventually<T>( | |
giveUpAfterNumberOfRetries: number, | |
nextInterval: (numberOfRetries: number) => number = linearRetryInterval | |
) { |
// precondition: xs is always an array | |
function head(xs) { | |
if (xs.length === 0) return null | |
return xs[0] | |
} | |
function tail(xs) { | |
return xs.slice(1) | |
} |
#!/bin/sh | |
BOLD=$(tput BOLD) | |
NORMAL=$(tput sgr0) | |
RED='\033[0;31m' | |
LOCAL_SETTINGS_BASE=~/Library/Application\ Support/Code | |
LOCAL_SETTINGS="${LOCAL_SETTINGS_BASE}/User" | |
REMOTE_SETTINGS=~/Google\ Drive/App\ Sync/vscode/Settings |
I hereby claim:
To claim this, I am signing this object:
/** | |
* An ESLint formatter which shows only errors. Warnings are displayed only in form of an aggregated | |
* total number. | |
* | |
* Example Output: Only Warnings: | |
* | |
* > | |
* > ✖ 98 problems (0 errors, 98 warnings) | |
* > | |
* |
require '/Applications/Zephyros.app/Contents/Resources/libs/zephyros.rb' | |
require 'time' | |
@last_time = Time.now - 10 | |
@times = 0 | |
## | |
# Simply returns a Proc instance with the passed block. | |
def command | |
Proc.new |
- (void) loadCustomFont:(NSString*)fontFileName ofType:(NSString*)extension bundle:(NSBundle*)bundle { | |
NSString *fontPath = [bundle pathForResource:fontFileName ofType:extension]; | |
NSData *inData = [NSData dataWithContentsOfFile:fontPath]; | |
CFErrorRef error; | |
CGDataProviderRef provider = CGDataProviderCreateWithCFData((__bridge CFDataRef)inData); | |
CGFontRef font = CGFontCreateWithDataProvider(provider); | |
if (!CTFontManagerRegisterGraphicsFont(font, &error)) { | |
CFStringRef errorDescription = CFErrorCopyDescription(error); | |
NSLog(@"Failed to load font: %@", errorDescription); |