Skip to content

Instantly share code, notes, and snippets.

@metaColin
metaColin / ipod-video-encode.sh
Created August 29, 2023 08:42
This script uses FFMPEG to convert videos to formats compatible with various iPods based on encoding profiles described in Apple technical specifications.
t#!/bin/bash
#
# Script Name: Colin's iPod Video Encoding Tool
# Version 0.2
# Description: This script uses FFMPEG to convert videos to formats compatible with various iPods based on encoding profiles described in Apple technical specifications.
# Author: Colin Steinmann
# Contact: https://github.com/metaColin
# Date: August 29, 2023
#
# License:
@metaColin
metaColin / front_end_JS_toBase64_fromBase64
Last active February 10, 2017 22:04
toBase64 & fromBase64 functions for front end javascript
// grr why is base64 encoding not easier in frontend js?
var fromBase64 = function fromBase64(base64) {
var raw = window.atob(base64);
var rawLength = raw.length;
var ab = new ArrayBuffer(rawLength);
var array = new Uint8Array(ab);
for (var i = 0; i < rawLength; i++) {
array[i] = raw.charCodeAt(i);
}
@metaColin
metaColin / html5_video_convert.sh
Created March 8, 2016 08:04 — forked from bionik/html5_video_convert.sh
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
@metaColin
metaColin / gist:09076a7904a52ffd2fef
Created October 7, 2015 22:36
A simple Unity Web Plugin
<html>
<head>
<script type='text/javascript' src='https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/jquery.min.js'></script>
<script type="text/javascript">
var unityObjectUrl = "http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js";
if (document.location.protocol == 'https:')
unityObjectUrl = unityObjectUrl.replace("http://", "https://ssl-");
document.write('<script type="text\/javascript" src="' + unityObjectUrl + '"><\/script>');
</script>
<script type="text/javascript">
@metaColin
metaColin / sublime text settings
Created September 6, 2015 08:13
sublime text settings
{
"color_scheme": "Packages/Seti_UI/Scheme/Seti_monokai.tmTheme",
"fade_fold_buttons": false,
"font_size": 12,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"tab_size": 4,
@metaColin
metaColin / index.html
Created August 11, 2015 01:58
Bare minimum HTML5 document
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!-- page content -->
@metaColin
metaColin / .bash_profile
Last active August 29, 2015 14:11
bash profile Dec 2014
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@metaColin
metaColin / cats-animated.html
Created December 18, 2014 21:16
All your base are belong to us!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>All Your Base</title>
<link rel="stylesheet" href="style.css">
<style type="text/css">
*{
margin: 0;
@metaColin
metaColin / cats.html
Created December 18, 2014 20:02
a basic html file for testing purposes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Main screen turn on.</title>
<link rel="stylesheet" href="style.css">
<style type="text/css">
*{
margin: 0;
@metaColin
metaColin / js-required.html
Last active August 29, 2015 14:07
JavaScript Required Snippet
<noscript>JavaScript is disabled. Please <a href="http://www.enable-javascript.com" target="_blank">enable JavaScript</a> to use this site.</noscript>