Skip to content

Instantly share code, notes, and snippets.

View jaredmcateer's full-sized avatar
🏠
Working from home (I'm always working from home)

Jared McAteer jaredmcateer

🏠
Working from home (I'm always working from home)
View GitHub Profile
@jaredmcateer
jaredmcateer / reposition-recently-uploaded.js
Created March 16, 2022 14:14
Reposition Recently Updated Chip on YouTube to front of the list
// ==UserScript==
// @name Reposition Recently Uploaded Chip
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Repositions the "Recently Uploaded" chip to the front
// @author RadicalDowntownUrbanite
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?domain=youtube.com
// @grant none
// ==/UserScript==
@jaredmcateer
jaredmcateer / angular-localizer-treeprocessor.rb
Last active March 7, 2017 22:38 — forked from mojavelinux/angular-localizer-treeprocessor.rb
An Asciidoctor treeprocessor that wraps text content in Angular's localize filter.
require 'asciidoctor/extensions'
class AngularLocalizerTreeprocessor < Asciidoctor::Extensions::Treeprocessor
def process document
document.blocks? ? (localize_blocks document) : nil
end
def localize_blocks node
node.find_by do |b|
if b.content_model == :simple
Original
#<Asciidoctor::ListItem@47313569818400 {list_context: :ulist, text: "<<worklist,Worklist>>", blocks: 0}>
new_block
#<Asciidoctor::ListItem@47313570547660 {list_context: :ulist, text: "{{<a href=\"#worklist\">Worklist</a> | localize}}", blocks: 0}>
Desired
#<Asciidoctor::ListItem@47313570547660 {list_context: :ulist, text: "{{<<worklist,Worklist>> | localize}}", blocks: 0}>
#!/bin/bash
gnome-terminal -e "bash -c 'source ~/.bashrc;vim $1'"
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
# First you need to change the root password so you can ssh in as root
vagrant ssh
sudo su
passwd
root
root
exit
# On your host machine:
@jaredmcateer
jaredmcateer / Procfile
Last active December 18, 2015 00:39 — forked from anderssvendal/Procfile
web: /usr/local/sbin/nginx -p `pwd`/tmp/nginx/ -c ../../nginx.conf
fastcgi: /usr/local/sbin/php-fpm
db: /usr/local/bin/mysqld
@jaredmcateer
jaredmcateer / gist:4999410
Created February 20, 2013 20:40
Bookmarklet that keeps your user list sorted when it gets updated instead of putting new users at the bottom of the list like a chump
javascript:(function(){chat.update_roster=function(room_jid){if(room_jid&&room_jid!=app.current_jid){return;}var roster=(room_jid?app.room_rosters[room_jid].sort(function(a,b){if(a.name<b.name){return-1;}else if(a.name>b.name){return 1;}return 0;}):app.roster);if(!roster){return;}$('#roster div.member').remove();for(var i=0;i<roster.length;i++){var status_info=this.get_status_info(roster[i]);var member=roster[i];$('#roster div.list').append('<div class="'+roster[i].role+'"><div jid="'+roster[i].jid+'" class="member '+status_info.show+'">'+member.name+'<span class="idle">'+status_info.idle+'</span><span class="status">'+status_info.status+'</span></div></div>');}$('#roster div.member').dblclick($.proxy(this,'handle_roster_dblclick')).mouseover(function(event){$(this).css('background-color','#F0F0F0');}).mouseout(function(event){$(this).css('background-color','#FFFFFF');}).tooltip({bodyHandler:chat.generate_roster_tooltip});if(config.mobile){$('#roster div.member').click($.proxy(this,'handle_roster_dblclick'));
@jaredmcateer
jaredmcateer / gist:3137486
Created July 18, 2012 17:05
Bitbucket error
Uncaught TypeError: Object function (z,L){var C;z||(z={});if(C=this.defaults){if(d.isFunction(C))C=C.call(this);z=d.extend({},C,z)}this.attributes=
{};this._escapedAttributes={};this.cid=d.uniqueId("c");this.set(z,{silent:true});this._changed=false;this._previousAttributes=d.clone(this.attributes);if(L&&L.collection)this.collection=L.collection;this.initialize(z,L)} has no method '_bindRoutes'
@jaredmcateer
jaredmcateer / gist:2853227
Created June 1, 2012 16:07
Rally Userstyle Mozilla
@-moz-document domain("rally1.rallydev.com") {
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td{
font-family: "Droid Sans", "Ubuntu", sans-serif;
}
#notesEditorContainer {
height: 830px;
}
.nav-tab, .nav-tab-active, .tab {