Skip to content

Instantly share code, notes, and snippets.

Joakim Wimmerstedt cupofjoakim

Block or report user

Report or block cupofjoakim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pubsub.coffee
exports.pubsub = (->
listeners = {}
subscribe: (name, callback) ->
listeners[name] = [] unless listeners[name]
listeners[name].push callback
publish: (name) ->
args = Array::slice.call(arguments, 1)
if listeners[name]
i = 0
@cupofjoakim
cupofjoakim / ffmpeg-convert.sh
Last active Aug 29, 2015
A little shell script for converting two files to avi, mp4 & wmv while keeping the resolution intact. Uses FFMPEG. Due to multiple clients with different needs for a project, we needed a smooth way of doing shizzle.
View ffmpeg-convert.sh
#!/bin/bash
#
# A little shell script for converting two files to
# avi, mp4 & wmv while keeping the resolution intact.
# Uses FFMPEG.
#
# Create folder inside Converts
mkdir -p Converts/$3
@cupofjoakim
cupofjoakim / recss
Created Sep 5, 2014
Bookmarklet for reloading css
View recss
javascript:void(function()%7Bvar%20i,a,s%3Ba%3Ddocument.getElementsByTagName(%27link%27)%3Bfor(i%3D0%3Bi%3Ca.length%3Bi%2B%2B)%7Bs%3Da%5Bi%5D%3Bif(s.rel.toLowerCase().indexOf(%27stylesheet%27)%3E%3D0%26%26s.href)%20%7Bvar%20h%3Ds.href.replace(/(%26%7C%5C%3F)forceReload%3D%5Cd%2B/,%27%27)%3Bs.href%3Dh%2B(h.indexOf(%27%3F%27)%3E%3D0%3F%27%26%27:%27%3F%27)%2B%27forceReload%3D%27%2B(new%20Date().valueOf())%7D%7D%7D)()%3B
You can’t perform that action at this time.