Skip to content

Instantly share code, notes, and snippets.

View bartek's full-sized avatar
🐗

Bartek Ciszkowski bartek

🐗
View GitHub Profile
@bartek
bartek / pre-commit
Created December 10, 2018 14:02 — forked from pbhandari/pre-commit
pre commit hook for running pylint
#!/bin/sh
DESIRED_VENV=compass
if [ -z $VIRTUAL_ENV ] || [ "`basename $VIRTUAL_ENV`" != "$DESIRED_VENV" ]; then
echo You\'re not in the $DESIRED_VENV virtualenv, \`workon $DESIRED_VENV\` to fix.
exit 1
fi
RCFILE="`git rev-parse --show-toplevel`"/.pylintrc
@bartek
bartek / tutorial.md
Created July 25, 2018 01:21 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@bartek
bartek / dns tuning ssh login speedup vagrant
Created September 19, 2016 14:02 — forked from jedi4ever/dns tuning ssh login speedup vagrant
speeding up DNS/SSH connections in vagrant
- Tune /etc/ssh/sshd_config
UseDNS no # Disable DNS lookups
GSSAPIAuthentication no # Disable negotation of slow GSSAPI
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it
- Tune Vagrantfile
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@bartek
bartek / gist:0e751057c78b82689be4
Created November 19, 2015 02:14 — forked from jberkus/gist:6b1bcaf7724dfc2a54f3
Finding Unused Indexes
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style