Skip to content

Instantly share code, notes, and snippets.

Adrian Juszczak Juszczak

Block or report user

Report or block Juszczak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Juszczak /
Created Jan 13, 2018
Fix FS Watcher on Ubuntu
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf ; sudo sysctl -p
Juszczak / get_buffers_number.vim
Created Sep 7, 2017
Returns number of buffers in Vim
View get_buffers_number.vim
function! GetBuffersNumber()
return len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
Juszczak / KeyCodes.ts
Created Jul 21, 2017
KeyboardEvent key codes enum
View KeyCodes.ts
export enum KeyCodes {
Backspace = 8,
Tab = 9,
Enter = 13,
Shift = 16,
Ctrl = 17,
Alt = 18,
PauseBreak = 19,
CapsLock = 20,
Escape = 27,
Juszczak / converter.js
Last active Jun 1, 2017
dirty `.json` <-> `.properties` converter
View converter.js
const fs = require('fs')
const path = require('path')
const readJSON = fileName => JSON.parse(fs.readFileSync(path.resolve(process.cwd(), fileName), 'utf8'))
const toJSON = data => {
const output = {}
View gpg.asc
Version: GnuPG v2

Keybase proof

I hereby claim:

  • I am juszczak on github.
  • I am juszczak ( on keybase.
  • I have a public key ASDhgxSrsMgfIAUaa-q2s4hD_gtMUWmdOyo3lNlv9-a2zQo

To claim this, I am signing this object:

Juszczak / s3copy-across-aws-accounts.js
Created Nov 18, 2015 — forked from raffi-minassian/s3copy-across-aws-accounts.js
Quick and dirty script to copy files in AWS S3 to an S3 bucket in another AWS account with Node.js.
View s3copy-across-aws-accounts.js
* 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
Juszczak / base64-typescript-class.ts
Created Nov 12, 2015
TypeScript class for Base64 encoding/decoding
View base64-typescript-class.ts
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 {
Juszczak /
Created Oct 26, 2015
Disable the Window Shadow on Screen Shots in Mac OS X
defaults write disable-shadow -bool true
killall SystemUIServer
Juszczak /
Created Jul 6, 2015
Add some generic CORS configuration to your CouchDB using curl. You can always change the configuration by simply going to and updating the values. However, these default options are good for getting up and running.
HOST=http://name:password@ # 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"'
You can’t perform that action at this time.