Skip to content

Instantly share code, notes, and snippets.

View klaascuvelier's full-sized avatar

Klaas Cuvelier klaascuvelier

View GitHub Profile
@klaascuvelier
klaascuvelier / earport-extension.js
Last active December 16, 2015 03:29
Extension for Earport.fm: Drag & Drop mp3 files and m3u playlists on the screen to add them to the Earport playlist.
(function () {
var $dropView = $('<div style="position: absolute; left: 0; top: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.5); z-index: 9999; color: #fff; padding: 100px; text-align: center; font-size: 32px">drop music or playlists</div>'),
$body = $('body'),
songsToAdd = [],
filesToParse = [];
$body.append('<script src="https://raw.github.com/vjeux/jDataView/master/src/jdataview.js"></script>');
Earport.Api.socket.on('search.query', songsFound);
Earport.Api.socket.on('playlist.queue', songQueued);
@klaascuvelier
klaascuvelier / SublimeText2-UserPreferences
Created October 18, 2012 07:33
Sublime Text 2 - User preferences
{
"close_windows_when_empty": false,
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow.tmTheme",
"draw_white_space": "all",
"find_selected_text": true,
"fold_buttons": true,
"folder_exclude_patterns":
[
".svn",
".git",
@klaascuvelier
klaascuvelier / gist:2000048
Created March 8, 2012 09:56
Best captcha E.V.E.R.
var a = document.getElementsByTagName('img'), i, l = a.length, s = ''; for (i = 4; i < l; i++) { s += a[i].src.substr(52, 1); } document.forms[0]['Spam'].value = s;
@klaascuvelier
klaascuvelier / responsive.html
Created February 8, 2012 13:56 — forked from lensco/responsive.html
Responsive design tester - Fork of Lenscos gist for reponsive design tester (https://gist.github.com/1685127) added allow-scripts and update all frame locations when one of the frames location changes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }