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
@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 / 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 / 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

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)

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.

@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:

@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 / 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
wget -N -r -l1 -Nc -nd -A "33c3-*-eng-*-hd.webm" https://cdn.media.ccc.de/congress/2016/webm-hd/
@poppingtonic
poppingtonic / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created January 13, 2017 13:40 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".