I hereby claim:
- I am mble on github.
- I am mble (https://keybase.io/mble) on keybase.
- I have a public key whose fingerprint is F8EB 5FA1 AF31 4841 A12E 1DCD FA17 3BD9 9CB2 5A39
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 | |
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr | |
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com | |
Protocol 2 | |
HostKey /etc/ssh/ssh_host_ed25519_key | |
HostKey /etc/ssh/ssh_host_rsa_key | |
PasswordAuthentication no | |
ChallengeResponseAuthentication no |
-- Small example demonstrating to calculate the median without using an custom built aggregate function | |
select | |
min(score) | |
-- percentile_cont is a function that returns a value corresponding to the specified fraction in the ordering, | |
-- interpolating between adjacent input items if needed. By setting the fraction to 0.5, this essentially works | |
-- as the median of the ordered set provided by the grouping. | |
, percentile_cont(0.5) with group (order by score) AS median | |
, max(score) | |
from result; |
-- Fetch all films two actors appeared in together and order alphabetically | |
-- film, film_actor and actor tables, with a simple schema | |
select f.title | |
from film f | |
inner join ( | |
select fa.film_id | |
from film_actor fa | |
where fa.actor_id in (105, 122) | |
group by fa.film_id |
-- Don't display the "helpful" message on startup. | |
\set QUIET 1 | |
\pset null '[NULL]' | |
\pset linestyle unicode | |
\pset border 2 | |
-- http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING | |
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# ' | |
-- PROMPT2 is printed when the prompt expects more input, like when you type | |
-- SELECT * FROM<enter>. %R shows what type of input it expects. |
-- create some data | |
create table users ( | |
id serial primary key, | |
shadowbanned boolean default false | |
); | |
create table posts ( | |
id serial primary key, | |
user_id integer references users(id) | |
); |
#!/usr/bin/env python3 | |
# NAME | |
# cidr-press - quickly validate a CIDR block without having to think about it | |
# | |
# SYNOPSIS | |
# cidr-press [--cidr-block CIDR_BLOCK] [--file FILE] | |
import argparse | |
import ipaddress |