Skip to content

Instantly share code, notes, and snippets.

View bionik's full-sized avatar

Lauri Hakkarainen bionik

View GitHub Profile
@bionik
bionik / html5_video_convert.sh
Created January 22, 2015 13:44
Simple HTML5 video encoding bash script for OS X (Easily ported to Linux)
#!/bin/bash
set -e
# IMPORTANT! First install ffmpeg with encoders enabled, i.e. like this:
# brew install ffmpeg --with-libvpx --with-libvorbis --with-theora
# Will not re-encode files, if output file exists.
# Quality settings are configured in encoders' command line parameters below, sorry about that.
if [ -z "$1" ]; then
@bionik
bionik / gist:d3ec2936de95b3c119f7
Created February 2, 2015 13:12
Setting up Raspbian on Raspberry Pi on OS X
Setting up Raspbian on Raspberry Pi on OS X
1) Download Raspbian image. http://www.raspberrypi.org/downloads/
2) Install the image on a SD card:
diskutil list #Get the SD card path, ie. /dev/disk2
diskutil unmountDisk /dev/disk2 #Unmount the SD card
@bionik
bionik / gist:483b4b144da5cb54606b
Last active March 29, 2016 16:32
Slim down Ubuntu server dynamic motd
The dynamic motd shows a bit too much info by default:
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-45-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Thu Feb 12 22:05:52 EET 2015
System load: 0.01 Processes: 153
Usage of /home: 11.8% of 274.89GB Users logged in: 0
@bionik
bionik / gist:ab89cc6333639ac0a061ad810e3292b1
Last active November 24, 2016 11:09
PocketCHIP text mode setup on 4.3
PocketCHIP 4.3 on text mode
===========================
EDIT: Also available on CHIP community wiki: http://www.chip-community.org/index.php/Setting_up_text_mode_on_4.3
This guide includes the steps I needed to go through to get the PC to work properly in text mode, from a clean 4.3 firmware.
[On GUI terminal, when connected to WiFi]
sudo apt-get update && sudo apt-get upgrade
@bionik
bionik / gist:73138b5f0186f2761a337d4f85dc2bfb
Created June 14, 2018 12:38
apina.biz video to gif userscript
// ==UserScript==
// @name Apina.biz video2gif
// @description Replace apina.biz videos with gif
// @namespace bionik
// @include https://apina.biz/*
// @version 1
// @grant none
// ==/UserScript==
var videos = document.querySelectorAll('video.gif');