Skip to content

Instantly share code, notes, and snippets.

View poppingtonic's full-sized avatar
💭
I may be slow to respond.

Brian Muhia poppingtonic

💭
I may be slow to respond.
View GitHub Profile
wget -N -r -l1 -Nc -nd -A "33c3-*-eng-*-hd.webm" https://cdn.media.ccc.de/congress/2016/webm-hd/
@poppingtonic
poppingtonic / geekout_jam.rb
Last active January 1, 2017 00:28
Livecoding Snippet #2
# Geek0ut! Witness me!
notes = (scale :e2, :minor_pentatonic, num_octaves: 2)
live_loop :feh do
with_fx :wobble, reps: 3, amp: 0.1 do
use_synth :tb303
play (ring :e1, :e2, :e3).tick - 12, release: 0.7, cutoff: rrand(70, 130)
sleep 0.125
end
end
@poppingtonic
poppingtonic / jam.rb
Created December 26, 2016 21:48
Sonic PI Livecoding Snippet #1
live_loop :lloop do
with_fx :reverb, room: 0.5 do
sample :bd_boom, amp: 10, rate: 1
end
play 55
sleep 0.8
play 52.3
sleep 0.25
play 52.63
sleep 0.25
@poppingtonic
poppingtonic / keybase.md
Created November 18, 2016 11:07
My keybase proof

Keybase proof

I hereby claim:

  • I am poppingtonic on github.
  • I am poppingtonic (https://keybase.io/poppingtonic) on keybase.
  • I have a public key ASAcJSz541udbGps8oIKYXOLTyrMnW4nLrwbspkLc4BD0Qo

To claim this, I am signing this object:

Types

A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.

Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer. In that case, the programmer isn't allowed to say x = true; that would be an invalid program. The compiler will refuse to compile it, so we can't even run it.

Simple Security Guidelines

  • Use an iDevice

    • Use an iPod or an iPad without a SIM card
    • Use an iPhone
    • Do not jailbreak
    • Always upgrade to new iOS versions
  • Use Signal (iOS + Android)

@poppingtonic
poppingtonic / make_logs_readable.sh
Last active August 17, 2016 20:15
If you need to read ##hplusroadmap logs
#!/usr/bin/env bash
sed -i.bak '/\-!\-/d' 2016-08-16.log && gzip -9 2016-08-16.log.bak
# > ls -sh
# total 24K
# 12K sample.txt 12K sample.txt.bak
@poppingtonic
poppingtonic / make_logs_readable.sh
Created August 17, 2016 20:14
If you need to read ##hplusroadmap logs
#!/usr/bin/env bash
sed -i.bak '/\-!\-/d' 2016-08-16.log && && gzip -9 2016-08-16.log.bak
# > ls -sh
# total 24K
# 12K sample.txt 12K sample.txt.bak
@poppingtonic
poppingtonic / english_to_tengwar.py
Created June 6, 2016 17:12 — forked from csvoss/english_to_tengwar.py
English to Tengwar transliterator
# This file converts English text to Tengwar, using my own personal
# preferences for transliterating Tengwar.
#
# Currently, the output that is created is intended for use with the Tengwar
# Annatar font and related font families.
#
# Example usage:
# >>> print convert("This was a triumph. I'm making a note here: huge success!")
#
# -- then paste the resulting text into a document rendered in Tengwar Annatar.
@poppingtonic
poppingtonic / parsel.sql
Created March 7, 2016 06:12
Parsel: A Simple Function for Parallel Query in Postgres using Dblink
-- DROP FUNCTION IF EXISTS public.parsel(db text, table_to_chunk text, pkey text, query text, output_table text, table_to_chunk_alias text, num_chunks integer);
CREATE OR REPLACE FUNCTION public.parsel(db text, table_to_chunk text, pkey text, query text, output_table text, table_to_chunk_alias text default '', num_chunks integer default 2)
RETURNS text AS
$BODY$
DECLARE
sql TEXT;
min_id integer;
max_id integer;
step_size integer;
lbnd integer;