Skip to content

Instantly share code, notes, and snippets.

🚀
relentless maker.

Eric Martindale martindale

🚀
relentless maker.
Block or report user

Report or block martindale

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 gist:2722752
>++++++++++[<++++++++++>-]<[>+>[-]>++++++++++[<++++++++++>-]<+<<[->>->+<<<]>>>
[-<<<+>>>]<>>+++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[-]]>[-]
<<<[[-]++++++++++[>++++++++++<-]>++.+++.[-]<[-]+++++++++++[>+++++++++++<-]>+..
[-]<[-]<<[-]>>]<>>+++++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[
-]]>[-]<<<[[-]+++++++++[>+++++++++++<-]>-.[-]<[-]+++++++++[>+++++++++++++<-]>.
+++++..[-]<[-]<<[-]>>]<<[[-]>>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>>[
>++++++++[<++++++>-]<.[-]]<>++++++++[<++++++>-]<.[-]<<<]>[-]++++++++++.[-]<[-]
<-]
@martindale
martindale / gist:3895718
Created Oct 15, 2012 — forked from chrisinajar/gist:3889750
better chat window
View gist:3895718
// 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 Oct 16, 2012
jarplug phantomjs beginnings
View jarplug.js
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 Oct 16, 2012 — forked from pantlesswonder/plug.fm.js
plug.fm phantomjs
View plug.fm.js
// 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 Nov 7, 2012
discotymeplaes
View d.js
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();
View gist:5940374
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 Jul 18, 2013
MinSDK version is 15... I think we need 16 if allowing local file access.
View AndroidManifest.xml
<?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 Jul 24, 2013
This should generate a series of 1-day timeslices for the previous 30 days (including current day).
View Timeslice Generator
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 Aug 2, 2013
dark theme for soundtrack.io
View gist:6143582
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 Dec 8, 2019
Parse a string, such as a YouTube video title, for artist and track information.
View parseTitleString.js
// 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 || '';
You can’t perform that action at this time.