Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Bunn mypetyak

View GitHub Profile
@mypetyak
mypetyak / OSX-Convert-MOV-GIF.md
Last active Mar 29, 2020 — forked from tskaggs/OSX-Convert-MOV-GIF.md
Creating GIFs from .MOV files in OSX using FFmpeg and ImageMagick
View OSX-Convert-MOV-GIF.md

Convert .mov to .gif

# produce frames
❯ ffmpeg -i ernie.mov -vf scale=200:-1 -r 5 output/ffout%3d.png

# compose the .gif
❯ convert -delay 8 -loop 0 output/ffout*.* output/animation.gif

# shrink the file
❯ mogrify -layers 'optimize' -fuzz 7% output/animation.gif
@mypetyak
mypetyak / unicode_sandwich.py
Created Nov 1, 2015
Unicode Sandwich, demonstrating multiple encodings.
View unicode_sandwich.py
# -*- encoding: utf-8 -*-
import re
# Byte string containing an Icelandic pangram encoded in mac_iceland
input = 'Svo h\x9alt, yxna k\xe0r \xdfeg\xddi j\x9c um d\x97p \x92 f\x8e \x87 b\xbe.'
# Create a Unicode object from the string, decoding with the mac_iceland
# encoding
u_string = input.decode('mac_iceland')
re.sub(r'\w{4}', u'xxxx', u_string, flags=re.UNICODE)
@mypetyak
mypetyak / config-4.4.13bunn007+
Created Nov 27, 2016
kernel config for CHIP
View config-4.4.13bunn007+
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 4.4.13 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_ARM_DMA_USE_IOMMU=y
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
CONFIG_MIGHT_HAVE_PCI=y
@mypetyak
mypetyak / build_arm7_kernel.sh
Created Nov 27, 2016
build a new kernel for ARM7 CHIP
View build_arm7_kernel.sh
#!/bin/bash
# The first argument should be the path to the existing
# kernel .config file you'd like to use as a baseline.
# Inspired by http://www.raspibo.org/wiki/index.php/Compile_the_Linux_kernel_for_Chip:_my_personal_HOWTO
# practice safe bash
set -e
set -u
set -o pipefail
View keybase.md

Keybase proof

I hereby claim:

  • I am mypetyak on github.
  • I am bunn (https://keybase.io/bunn) on keybase.
  • I have a public key whose fingerprint is A92A 7137 0D27 662E 291B 737C 803F F963 DF3E 39C6

To claim this, I am signing this object: