Skip to content

Instantly share code, notes, and snippets.

View afroald's full-sized avatar

Roald Hacquebord afroald

View GitHub Profile
// FROM https://discussions.apple.com/thread/8448615?answerId=33791006022#33791006022
**HDCP Errors iTunes\Safari fix**
Symptoms:
*You had to reset the PRAM on your Mac for whatever reason
*iTunes movies won't play. You either get a black playback window or an error related to HDCP.
*Hulu and Netflix movies won't play within the Safari browser.
*YouTube is unaffected by this.
docker run --rm -i hadolint/hadolint < Dockerfile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@afroald
afroald / throttle.js
Created September 29, 2015 14:53
A throttle function using requestAnimationFrame instead of timers
var requestAnimationFrame = window.requestAnimationFrame;
function throttle(callback) {
var tickRequested = false;
function tick() {
callback();
tickRequested = false;
}
@afroald
afroald / gist:7024413
Created October 17, 2013 12:56
MIME-Types for webfonts
application/x-font-ttf ttf;
application/font-otf otf;
application/octet-stream eot;
application/font-woff woff;
@afroald
afroald / btsync
Last active December 23, 2015 01:48
init.d script for BitTorrent Sync
#! /bin/sh
# /etc/init.d/btsync
#
DAEMON=/etc/btsync/btsync
CONFIG=/etc/btsync/sync.conf
start() {
$DAEMON --config $CONFIG
}
@afroald
afroald / Gemfile
Created May 13, 2013 11:13
How I run Laravel websites in Rack
source 'https://rubygems.org'
gem "rack", "~> 1.5.2"
gem "rack-rewrite", "~> 1.3.3"
gem "rack-legacy", :git => "git://github.com/Hacquebord-Buckles/rack-legacy.git"
@afroald
afroald / .gitignore
Last active December 14, 2015 00:09
Default .gitignore for Hacquebord & Buckles
# Mac OS X system files
.DS_Store
.AppleDouble
.LSOverride
Icon
# Thumbnails
._*
# Files that might appear on external disk
@afroald
afroald / config.ru
Created November 27, 2012 22:09
Config.ru for PHP in Pow
# Taken from https://coderwall.com/p/splmua
use Rack::Rewrite do
rewrite %r{(.*/$)}, lambda {|match, rack_env|
INDEXES.each do |index|
if File.exists?(File.join(Dir.getwd, rack_env['PATH_INFO'], index))
return rack_env['PATH_INFO'] + index
end
end
rack_env['PATH_INFO']