Skip to content

Instantly share code, notes, and snippets.

View wildeyes's full-sized avatar
🎯
Focusing

wildeyes wildeyes

🎯
Focusing
  • TLV
View GitHub Profile
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@wildeyes
wildeyes / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
@wildeyes
wildeyes / ConEmu.xml
Created February 18, 2015 12:43
My ConEmu Settings
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2015-02-18 09:54:47" build="140923">
<value name="StartType" type="hex" data="00"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data=""/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
var e = document.getElementById("ddlViewBy");
var strUser = e.options[e.selectedIndex].value;
@wildeyes
wildeyes / meteor.vlc.events.js
Last active November 26, 2015 17:29
Patch VLC events so that they'll be routed to Meteor.js
// Example usage:
// Meteor.SOMELAYOUT.events({
// "embed MediaPlayerPositionChanged": function(value) {
// console.log("Position is now at ", value);
// }
// });
if(Meteor.isClient) {
Meteor.startup(function() {
var embed = document.querySelector('embed'),
events = {
@wildeyes
wildeyes / split.vid.js
Last active September 12, 2015 11:27
Split a youtube playlist into playable files
// post about this: https://medium.com/@xwildeyes/download-and-split-a-youtube-playlist-into-playable-files-e208e2a2e51b
// A script to split a youtube "playlist" file
// into it's mp3 parts, with corresponding filenames and
// everything
// By wildeyes.
// give it the name produced by youtube-dl -x https://www.youtube.com/watch?v=5nhp6ULk7mE
youtubeAudioFilename = process.argv[2]
// basically, a list of pairs of (time, name) in the format 00:00[:00] artist - song
// see http://www.regexr.com/3bp42 for specs file example
specsFilename = process.argv[3]
@wildeyes
wildeyes / Default (OSX).sublime-keymap
Created December 11, 2015 19:23
Default OSX Sublime Text 3 Key Bindings
/*
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
and don't need to be repeated here. Anything listed here will take precedence, however.
*/
[
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
@wildeyes
wildeyes / polyfills.coffee
Created December 14, 2015 08:30
My favourite, essential " polyfills " for projects with coffeescripts.
# xxx turn this into a bower/npm module
Object.defineProperty Array.prototype, "last", { get: -> this[this.length - 1]}
Object.defineProperty Array.prototype, "first", { get: -> this[0]}
Function::property = (prop, desc) ->
Object.defineProperty @prototype, prop, desc
Function::getter = (prop, get) ->
Object.defineProperty @prototype, prop, {get, configurable: yes}
Function::setter = (prop, set) ->
Object.defineProperty @prototype, prop, {set, configurable: yes}
@wildeyes
wildeyes / load.js
Created May 14, 2016 20:43
Async Script Loading in Browser Javascript Snippet
(function(url) {
var scriptTag = document.createElement('script');
scriptTag.type = 'text/javascript';
scriptTag.async = true;
scriptTag.src = url;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(scriptTag, s);
})(URL);