Skip to content

Instantly share code, notes, and snippets.

View martindale's full-sized avatar
🚀
relentless maker.

Eric Martindale martindale

🚀
relentless maker.
View GitHub Profile
>++++++++++[<++++++++++>-]<[>+>[-]>++++++++++[<++++++++++>-]<+<<[->>->+<<<]>>>
[-<<<+>>>]<>>+++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[-]]>[-]
<<<[[-]++++++++++[>++++++++++<-]>++.+++.[-]<[-]+++++++++++[>+++++++++++<-]>+..
[-]<[-]<<[-]>>]<>>+++++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[
-]]>[-]<<<[[-]+++++++++[>+++++++++++<-]>-.[-]<[-]+++++++++[>+++++++++++++<-]>.
+++++..[-]<[-]<<[-]>>]<<[[-]>>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>>[
>++++++++[<++++++>-]<.[-]]<>++++++++[<++++++>-]<.[-]<<<]>[-]++++++++++.[-]<[-]
<-]
@martindale
martindale / gist:3895718
Created October 15, 2012 21:38 — forked from chrisinajar/gist:3889750
better chat window
// Make a bookmark with this in it:
javascript:(function(){$("#button-chat-expand").click(function() {$("#chat").animate({top:0})}); $("#button-chat-collapse").click(function() {$("#chat").animate({top:285})});$("#chat").css($("#playback").position()).width(842);$("#chat-messages").width(823); $.each(document.styleSheets, function(i, styleSheet) { $.each(styleSheet.cssRules, function(j, rule) { if (rule.selectorText == '.chat-message, .chat-mention, .chat-emote, .chat-skip, .chat-moderation, .chat-system, .chat-update' || rule.selectorText == '.chat-superuser' || rule.selectorText == '.chat-moderator') rule.style.width = '788px'; })});})();
@martindale
martindale / jarplug.js
Created October 16, 2012 00:26
jarplug phantomjs beginnings
var page = require('webpage').create();
// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.onLoadFinished = function(status){
if ('success' === status)
{
@martindale
martindale / plug.fm.js
Created October 16, 2012 00:54 — forked from pantlesswonder/plug.fm.js
plug.fm phantomjs
// Get twitter status for given account (or for the default one, "PhantomJS")
var page = require('webpage').create(),
twitterUsername = '',
twitterPassword = ''; //< default value
// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
page.onConsoleMessage = function(msg) {
console.log(msg);
};
@martindale
martindale / d.js
Created November 7, 2012 22:17
discotymeplaes
var e=!1,f=function(){var d=function(){var b=Math.floor(Math.random()*255),a=Math.floor(Math.random()*255),c=Math.floor(Math.random()*255);return"rgb("+b+","+a+","+c+")"},h=function(){jQuery("p, li, h1, h2, h3, div, span, a, input").each(function(b,a){if(jQuery(a).children().size()==0&&!jQuery(a).hasClass("partying")){var c=jQuery(a).text().split(" "),c=jQuery.map(jQuery.makeArray(c),function(a){return"<b style=\"color:"+d()+";display:inline ! important;font-size:auto ! important;font-weight:inherit ! important\" class=\"partying\">"+a+"</b>"});jQuery(a).html(c.join(" "))}});jQuery(".partying").each(function(b,a){jQuery(a).css("color",d())})},g=function(){setTimeout(function(){h();g();jQuery("body").css("background-color",d())},100)};g()};f();
var Site = angular.module('secret-project', []);
angular.element(document).ready(function() {
angular.bootstrap(document, [function($compileProvider, $locationProvider, $provide){
$locationProvider.html5Mode(true);
}]);
});
Site.config(function ($routeProvider) {
$routeProvider
@martindale
martindale / AndroidManifest.xml
Created July 18, 2013 16:16
MinSDK version is 15... I think we need 16 if allowing local file access.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.soundtrack"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="15"
@martindale
martindale / Timeslice Generator
Created July 24, 2013 22:57
This should generate a series of 1-day timeslices for the previous 30 days (including current day).
var start = new Date();
start.setHours('0');
start.setMinutes('0');
start.setSeconds('0');
start.setMilliseconds('0');
var end = new Date( start.getTime() );
end.setDate( end.getDate() + 1 );
var queries = [];
@martindale
martindale / gist:6143582
Created August 2, 2013 21:25
dark theme for soundtrack.io
body {
padding-top: 41px;
padding-bottom: 40px;
background: url('/img/binding_dark.png') rgb(22,22,22);
color: rgb(208,208,208);
}
textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
background: rgb(33,33,33);
border-radius: 0;
border: 0;
@martindale
martindale / parseTitleString.js
Last active September 25, 2020 01:33
Parse a string, such as a YouTube video title, for artist and track information.
// TODO: provide an array of potential separators
// var SEPARATORS = [' - ', ' – ', ' -- ']
// note that these can have spaces, but sometimes do not
// TODO: output a testing dataset for changes to this function.
var TRACK_SEPARATOR = ' - ';
function parseTitleString(string, partsCallback) {
var artist, title, credits = [];
var string = string || '';