Skip to content

Instantly share code, notes, and snippets.

<meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre>
*** Assembly Binder Log Entry (5/16/2014 @ 8:28:03 AM) ***
The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
--- A detailed error log follows.
// ==UserScript==
// @name Emulate `unsafeWindow` in browsers that don’t support it.
// ==/UserScript==
// http://mths.be/unsafewindow
window.unsafeWindow || (
unsafeWindow = (function() {
var el = document.createElement('p');
el.setAttribute('onclick', 'return window;');
return el.onclick();
@alexcpendleton
alexcpendleton / gist:0aa6c2e8b8786a1013a4
Created June 10, 2014 01:58
Reddit sidebar toggler WIP
(function() {
var menuWidth = "15px";
var sideMenu = $(".side").css({position:"relative"});
var sideMenuVisibleDataAttribute = "acp-side-menu-visible";
var spacers = sideMenu.find(".spacer");
var toggler = $("<div/>").css({
position:"absolute", left:"0", top:"0",
height:"100%", background:"red", width:menuWidth,
"cursor":"pointer", border:"solid 1px",
"min-height":"200px"
@alexcpendleton
alexcpendleton / gist:127d4bda3ace1dd6189c
Created August 13, 2014 14:03
Plug.dj print current playlist to console
var items =[];
$(".playlist-media .row").each(function() {
var t = $(this);
items.push(t.find(".author").text() + " — " + t.find(".title").text());
});
console.log(items.join("\r\n"))
@alexcpendleton
alexcpendleton / gist:7b6b90d02896343e4d9a
Created September 15, 2014 23:56
Userscript for atom.io to add an "On Github" link so you can get to source code more quickly
// ==UserScript==
// @name Atom.io Easy Github link
// @namespace http://alexcpendleton.com
// @version 0.1
// @description Adds an "On Github" link to the Atom.io navigation
// @match https://atom.io/*
// @copyright 2012+, You
// ==/UserScript==
$(".navigation").append($("<li/>").append($("<a />").attr("href", "https://github.com/atom").text("On Github")));
@alexcpendleton
alexcpendleton / gist:5bac1716d2be92e854d9
Created October 3, 2014 14:26
Autowoot for Tampermonkey (Chrome)
// ==UserScript==
// @name Autowoot
// @namespace http://alexcpendleton.com
// @version 0.1
// @description Auto-woots every 30 seconds
// @author You
// @match https://plug.dj/*
// @grant none
// ==/UserScript==
(function() {
@alexcpendleton
alexcpendleton / gist:dd4fd80bc6706fcf9267
Created November 23, 2014 22:54
Hiding non-mod, non-broadcaster Twitch messages
// ==UserScript==
// @name Twitch Chat Customizer
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match http://www.twitch.tv/nakat973
// @grant none
// ==/UserScript==
@alexcpendleton
alexcpendleton / Jquery free
Last active August 29, 2015 14:14
Quick and dirty "Past Broadcasts" link on a twitch channel
var channelNode = document.querySelector("#channel .channel");
var profileLink = document.querySelector("#channel .profile-link");
if(channelNode && profileLink) {
var myNode = document.createElement("span");
myNode.class = "tpbs-container";
var dash = document.createElement("span");
dash.class = "tbps-dash";
dash.innerHTML = " &mdash; ";
var anchor = document.createElement("a");
anchor.class = "tbps-anchor";
@alexcpendleton
alexcpendleton / Fix Spotify.bat
Created August 24, 2015 18:01
Removes the localappdata Spotify folder so it will actually open
rmdir /S /Q "%localappdata%\Spotify"
@alexcpendleton
alexcpendleton / AVSpeechSynthesizerUttererTests.swift
Created June 28, 2016 01:35
Unit Testing AVSpeechSynthesizer in iOS
/*
Short version: Use `waitForExpectationsWithTimeout` so your methods get called.
Long version: I was trying to unit test some code that used the `AVSpeechSynthesizer` class and its delegate property. The unit test would never pass because the delegate methods were never called. I thought it'd be impossible, maybe because the sound libraries didn't get loaded property. I couldn't find anything directly relating to this topic, but eventually stumbled on the `XCTestExpectation` APIs. These essentially say "wait a few seconds before doing your asserts".
http://nshipster.com/xctestcase/#xctestexpectation
*/
import Foundation
import AVFoundation
import XCTest