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
# 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:
<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">
var TitleTest = TestCase('TitleTest');
TitleTest.prototype.defaultTitle = 'title';
TitleTest.prototype.defaultCount = '0';
TitleTest.prototype.setUp = function() {
var titleObj;
this.div = new Element('div');
$$('body').first().insert(this.div);
this.div.insert('<div id="title"><h1><span id="titleCaption">' + this.defaultTitle + '</span><span id="titleCount">' + this.defaultCount + '</span></h1></div>');
getWindowScroll: function() {
var T, L, W, H;
var w = window;
with (w.document) {
if (w.document.documentElement && documentElement.scrollTop) {
T = documentElement.scrollTop;
L = documentElement.scrollLeft;
} else if (w.document.body) {
T = body.scrollTop;
@jaredmcateer
jaredmcateer / gist:2386718
Created April 14, 2012 18:26
Firefox User Style for MemoryExpress.com
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("memoryexpress.com") {
.PLV_Image,
.PLV_Details,
.PLV_Stock,
.PLV_SaleStar,
.PLV_SaleSpacer {
display:none !important;
}
@jaredmcateer
jaredmcateer / gist:2386724
Created April 14, 2012 18:26
Google Chrome user style for MemoryExpress.com
.PLV_Image,
.PLV_Details,
.PLV_Stock,
.PLV_SaleStar,
.PLV_SaleSpacer {
display:none;
}
.PLV_Brand,
.PLV_Title {
@jaredmcateer
jaredmcateer / gist:2783646
Created May 24, 2012 19:15
Cookie manager bookmarklet (requires prototype)
javascript:(function(a){function c(a){var b=window.getComputedStyle(a.target,null);a.dataTransfer.setData("text/plain",parseInt(b.getPropertyValue("left"),10)-a.clientX+","+(parseInt(b.getPropertyValue("top"),10)-a.clientY))}function d(a){return a.preventDefault(),!1}function e(a){var b=a.dataTransfer.getData("text/plain").split(","),c=document.getElementById("cmgr_dragMe");return c.style.left=a.clientX+parseInt(b[0],10)+"px",c.style.top=a.clientY+parseInt(b[1],10)+"px",a.preventDefault(),!1}function f(){var a,b,c,d;return a='<h1>Cookie Manager [<span id="cmgr_close">X</span>]</h1>',b='<fieldset><legend>Add</legend><label>Key:<br><input type="text" id="cmgr_addKey" /></label><br><label>Value:<br><input type="text" id="cmgr_addValue" /></label><br><input type="submit" id="cmgr_addCookie" value="Add"></fieldset>',c='<fieldset><legend>Delete</legend><label>Key:<br><input type="text" id="cmgr_delKey" /></label><br><input type="submit" id="cmgr_delCookie" value="Delete" /></fieldset>',d='<fieldset><legend>Get</leg
@jaredmcateer
jaredmcateer / gist:2846398
Created May 31, 2012 21:22
Bookmarklet: Responsive Design Tester
javascript:document.write('<!DOCTYPE html><html><head><meta charset="utf-8"><title>Responsive Design Testing</title><style>body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }.wrapper { width: 6000px; }.frame { float: left; }h2 { margin: 0 0 5px 0; }iframe { margin: 0 20px 20px 0; border: 1px solid #666; }</style></head><body><div class="wrapper"><div class="frame"><h2>240<span> x 320</span> <small>(mobile)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="240" height="320"></iframe></div><div class="frame"><h2>320<span> x 480</span> <small>(mobile)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="320" height="480"></iframe></div><div class="frame"><h2>480<span> x 640</span> <small>(small tablet)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="480" height="640"></iframe></div><div class="frame"><h2>768<span> x 1024</span> <sma
@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 {
@jaredmcateer
jaredmcateer / gist:2853224
Created June 1, 2012 16:07
Rally Userstyle Chrome
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 {
border-top-left-radius: 4px;