Skip to content

Instantly share code, notes, and snippets.

@douglasback
douglasback / link-arrow.css
Created September 15, 2011 20:21
Generate arrows for links using nothing but CSS (Webkit, FF, IE8+)
@douglasback
douglasback / normalize.css
Created September 21, 2011 20:45
normalize - whitespace
/* 01 =Normalize.css
------------------------- */
/*! normalize.css 2011-08-12T17:28 UTC · http://github.com/necolas/normalize.css */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; }
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body { margin: 0; }
body, button, input, select, textarea { font-family: sans-serif; }
@douglasback
douglasback / button-inset-gradients.css
Created October 12, 2011 21:26
Smoother submit buttons. No more ugly borders.
.your-button-selector {
border: 0;
color: #fff;
background: #007da6;
-webkit-box-shadow: -1px -1px 5px #003b5a inset, 1px 1px 4px #d3e7f2 inset;
-moz-box-shadow: -1px -1px 5px #003b5a inset, 1px 1px 4px #6ec0f7 inset;
-ms-box-shadow: -1px -1px 5px #003b5a inset, 1px 1px 4px #6ec0f7 inset;
-o-box-shadow: -1px -1px 5px #003b5a inset, 1px 1px 4px #6ec0f7 inset;
box-shadow: -1px -1px 5px #003b5a inset, 1px 1px 4px #d3e7f2 inset;
}
@douglasback
douglasback / wrapper.regex
Created October 25, 2011 16:18
wrapper regex
pattern: (href|src)="(\/)((.)*?)"
replace: $1="http://[domain]/$3"
@douglasback
douglasback / sv_performance.php
Created November 1, 2011 18:51
Puts a little Query Count and Template Load time badge at the bottom right of the page. Copy this code into a new snippet, and place it anywhere within the <body> element.
{if member_group == '1'}
<div id="bsd-performance" style="position: fixed; right: 0; bottom: 0; padding: 7px; background: rgba(0,0,0,0.7); color: white; font-family: Verdana, sans-serif; z-index: 999; ">
<span id="bsd-total-queries">{total_queries}</span> queries<br />
<span id="bsd-elapsed-time">{elapsed_time}</span> seconds
</div>
{/if}
@douglasback
douglasback / sv_rainbow_performance.php
Created November 1, 2011 19:20
More colorful performance indicator
{if member_group == '1'}
<style>
@-webkit-keyframes rainbow {
0% {
background-color: rgba(255,0,0,0.7);
}
33% {
background-color: rgba(0,255,0,0.7);
}
66% {
@douglasback
douglasback / sv_performance.php
Created November 2, 2011 00:50
Add a little badge that displays the total number of queries and time spent parsing your EE template
{if member_group == '1'}
<div id="performance-widget" style="position: fixed; right: 0; bottom: 0; padding: 7px; background: rgba(0,0,0,0.7); color: white; font-family: Verdana, sans-serif; z-index: 999; ">
<span id="total-queries">{total_queries}</span> queries<br />
<span id="elapsed-time">{elapsed_time}</span> seconds
</div>
{/if}
// ==UserScript==
// @name Use Chosen for Harvest Project Timesheet Selector
// @author Yahel Carmon
// @description Uses Chosen for Harvest Project Timesheet Selector. Might break if they change anything. Use at your own risk.
// @namespace https://gist.github.com/gists/1229452
// @include http://*.harvestapp.com/entry/show/*
// @include https://*.harvestapp.com/entry/show/*
// @include http://*.harvestapp.com/daily
// @include https://*.harvestapp.com/daily
// ==/UserScript==
jQuery(document).ready(function(){
$('.close-reveal-modal').on("click", function(e){
e.preventDefault();
for (var i=0; i<window.player.length; i++){
window.player[i].pauseVideo();
}
});
});
#! /bin/bash
cd ..
GIT_DIR='.git'
umask 002 && git reset --hard