Skip to content

Instantly share code, notes, and snippets.

View popthestack's full-sized avatar
🍩
Eating Donuts

Ryan Martinsen popthestack

🍩
Eating Donuts
View GitHub Profile
@popthestack
popthestack / google-ssl-verbatim.xml
Created December 28, 2011 22:34
Google SSL Verbatim firefox search plugin
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Google SSL Verbatim</os:ShortName>
<os:Description>Google SSL Verbatim Search</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi3

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For less, I'm using the ruby version because this is what they suggest on the website. The javascript version may be different.

Variables

@popthestack
popthestack / gist:1230586
Created September 20, 2011 22:16
Fixing google search (Firefox search plugin) to include all my blasted terms.
- <os:Param name="q" value="{searchTerms}"/>
+ <os:Param name="q" value="allintext:{searchTerms}"/>
@popthestack
popthestack / solaris-mod.js
Created February 15, 2011 21:19
tumblr solaris theme without hiding youtube videos
// Solaris functions v1.1 by Matthew Buchanan http://matthewbuchanan.name except where noted
// Bind events to zoom controls to switch between link and high-res URLs
// and to open lightbox if there is no enclosing anchor around the image.
$("span.zoomcontrol").live("mouseenter", function() {
$(this).fadeTo("fast",0.75);
}).live("mouseleave", function() {
$(this).fadeTo("fast",0.375);
}).live("click", function(e) {
e.preventDefault();
<?php
$please['don\'t']='tell me';
$that['your']=$code->isMore->readable_than_mine;
$simply['because']=you::put()->brackets;
$onNew->lines=$when->everythingElse($you,'write',$looks->likeThis); // (no spaces, everything smashed together)
$i_want['to']->punch($you)->inTheFace();
<?php
function mytheme_get_user_profile($uid = NULL) {
if (empty($uid)) {
global $user;
$uid = $user->uid;
}
$result = db_query("
SELECT f.fid AS f__fid, f.name AS f__name, f.title AS f__title, v.value AS v__value
git clone git://repo.or.cz/fast-export.git
mkdir fast-export/log
mkdir your_new_git_repo
cd !$
git init
../fast-export/hg-fast-export.sh --force -r "../path_to/hg_repo" &> "../fast-export/log/export_log"
git gc --aggressive &>/dev/null &
# wait. it may take a while for the git gc command to finish even though it looks like it finished quickly.