I hereby claim:
- I am juszczak on github.
- I am juszczak (https://keybase.io/juszczak) on keybase.
- I have a public key ASDhgxSrsMgfIAUaa-q2s4hD_gtMUWmdOyo3lNlv9-a2zQo
To claim this, I am signing this object:
| // Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem | |
| // throw QuotaExceededError. We're going to detect this and just silently drop any calls to setItem | |
| // to avoid the entire page breaking, without having to do a check at each usage of Storage. | |
| (function(){ | |
| if (typeof localStorage === 'object') { | |
| try { | |
| localStorage.setItem('localStorage', 1); | |
| localStorage.removeItem('localStorage'); | |
| } catch (e) { | |
| Storage.prototype._setItem = Storage.prototype.setItem; |
| HOST=http://name:password@127.0.0.1:5984 # or whatever you got | |
| curl -X PUT $HOST/_config/httpd/enable_cors -d '"true"' | |
| curl -X PUT $HOST/_config/cors/origins -d '"*"' | |
| curl -X PUT $HOST/_config/cors/credentials -d '"true"' | |
| curl -X PUT $HOST/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"' | |
| curl -X PUT $HOST/_config/cors/headers -d '"accept, authorization, content-type, origin, referer, x-csrf-token"' |
| defaults write com.apple.screencapture disable-shadow -bool true | |
| killall SystemUIServer |
| class Base64 { | |
| private PADCHAR: string = '='; | |
| private ALPHA: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | |
| private getByte(s: string, i: number): number { | |
| const x = s.charCodeAt(i); | |
| return x; | |
| } | |
| private getByte64(s: string, i: number): number { |
| /* | |
| * This is a quick and dirty script for copying files in AWS S3 to other buckets. | |
| * This is written so it can work across AWS accounts. | |
| * You can hack in code to apply work or logic to each file. | |
| * | |
| * For each file, it downloads locally to a tmp file and then starts uploading as soon as possible | |
| * and deletes the file immediately when the upload is done. | |
| * | |
| * Best way to use: Spin up a micro in EC2, install node.js, | |
| * create a directory and install the dependencies with |
I hereby claim:
To claim this, I am signing this object:
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| Version: GnuPG v2 | |
| mQINBFicbNQBEADiIkNXvo26KhTKVfwiby+THPQRvaFYT6WN+zqc3/bAe8bYXGDV | |
| AxRvdE1+2rjgtiUHFUEZ41CuMrS2W142kDVnY9RjbxBVw1Q2W+h+y+5UT21Xqtoi | |
| RTV64mXYkRUpnmV7dWco6g+gO+imPNHR0bBlBDWrMtq5PNq40h5sRQmF/v9x8Pe3 | |
| 8aWyFfmtRsV1lqRavkt/GwLoxyCDxdEKemApwjHanKw/Yu9g71tE8icwnYy1u8cn | |
| 86nw9y04K1AY93pgxu3XR80nWICs4D0rfPDH2SG9b86TIgENNXZBvrLTzRaRwN5l | |
| aCmRR5NcLJcoZH7ydeZMOhX45irnnmEzmYlSKO7oLB0MFgXjFw8bQ9lmQ/gNnZr3 | |
| rH9BnTX4Sx2EGyL9tzO3+4DXuEmzaW8hN4+dNupoDSO5gfL3JmnPVYEhAeN5HBLR |
| const fs = require('fs') | |
| const path = require('path') | |
| const PROPS_DELIMITER = '=' | |
| const readJSON = fileName => JSON.parse(fs.readFileSync(path.resolve(process.cwd(), fileName), 'utf8')) | |
| const toJSON = data => { | |
| const output = {} | |
| data.split('\n') |
| export enum KeyCodes { | |
| Backspace = 8, | |
| Tab = 9, | |
| Enter = 13, | |
| Shift = 16, | |
| Ctrl = 17, | |
| Alt = 18, | |
| PauseBreak = 19, | |
| CapsLock = 20, | |
| Escape = 27, |
| function! GetBuffersNumber() | |
| return len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) | |
| endfunction |