This guide includes queries for postgreql
Set pager off
\pset pager off- Check when vaccum was run
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
| require('isomorphic-fetch'); | |
| fetch('https://1jzxrj179.lp.gql.zone/graphql', { | |
| method: 'POST', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ query: '{ posts { title } }' }), | |
| }) | |
| .then(res => res.json()) | |
| .then(res => console.log(res.data)); |
| #!/usr/bin/env bash | |
| # This script prints out all of your Redis keys and their size in a human readable format | |
| # Copyright 2013 Brent O'Connor | |
| # License: http://www.apache.org/licenses/LICENSE-2.0 | |
| human_size() { | |
| awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
| } |
This gist is for my talk Faster JavaScript.
| // Package deepcopy provides a function for deep copying map[string]interface{} | |
| // values. Inspired by the StackOverflow answer at: | |
| // http://stackoverflow.com/a/28579297/1366283 | |
| // | |
| // Uses the golang.org/pkg/encoding/gob package to do this and therefore has the | |
| // same caveats. | |
| // See: https://blog.golang.org/gobs-of-data | |
| // See: https://golang.org/pkg/encoding/gob/ | |
| package deepcopy |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
gpg --list-secret-keys and look for sec, use the key ID for the next stepgit to use GPG -- replace the key with the one from gpg --list-secret-keys| # udev rule to detect android devices | |
| # These rules refer to http://developer.android.com/tools/device.html | |
| # Acer | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev" | |
| # Archos | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0666", GROUP="plugdev" | |
| # Asus | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev" | |
| # Azpen Onda |
A Pen by Odysseas Samaras on CodePen.