A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.
If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.
http://www.apple.com/osx/elcapitan-preview/
A running example of the code from:
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| // for an updated version see https://github.com/jsdf/react-native-refreshable-listview | |
| var React = require('react-native') | |
| var { | |
| ListView, | |
| ActivityIndicatorIOS, | |
| StyleSheet, | |
| View, | |
| Text, | |
| } = React |
| #!/usr/bin/env bash | |
| # shellcheck disable=SC2034 | |
| # shellcheck disable=SC1091 | |
| # shellcheck disable=SC2154 | |
| # PADD | |
| # | |
| # A more advanced version of the chronometer provided with Pihole | |
| # SETS LOCALE |
| #! /bin/bash | |
| # originaly from http://tinyurl.com/twitch-linux from taladan | |
| # www.youtube.com/user/taladan | |
| # gist created by brodul | |
| INRES="1280x800" # input resolution | |
| #OUTRES="1024x640" # Output resolution | |
| OUTRES="800x500" # Output resolution |