Skip to content

Instantly share code, notes, and snippets.

View rlemon's full-sized avatar
🍋
Hanging around.

Robert Lemon rlemon

🍋
Hanging around.
  • Dryer Moisture Systems Inc.
  • Kitchener, Ontario. Canada.
View GitHub Profile
@rlemon
rlemon / gist:1476876
Created December 14, 2011 14:49
ssi filter mock html
<form name="filter">
<div class="filter_term">
<label>Term:<input type='text' /></label>
</div>
<div class="filter_groups">
<label>Groups:<select name="groups">
<option value=""> - N/A - </option>
<option value="01">This is some group name</option>
<option value="2">FOO BAR</option>
<option value="3">Hello World</option>
@rlemon
rlemon / gist:1476879
Created December 14, 2011 14:49
ssi filter js
var makeElm = function(type) {
return document.createElement(type);
};
var frm = document.forms.filter,
list_groups = document.getElementsByClassName('filter_groups')[0],
list_suppliers = document.getElementsByClassName('filter_suppliers')[0],
array_groups = [],
array_suppliers = [];
@rlemon
rlemon / gist:1476881
Created December 14, 2011 14:50
ssi css junk
td {
padding: 10px;
}
.filter_groups, .filter_suppliers {
float: left;
}
a {
cursor: pointer;
}
@rlemon
rlemon / gist:1477011
Created December 14, 2011 15:25
jqzoom source
/*!
* jQzoom Evolution Library v2.3 - Javascript Image magnifier
* http://www.mind-projects.it
*
* Copyright 2011, Engineer Marco Renzi
* Licensed under the BSD license.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@rlemon
rlemon / gist:1482797
Created December 15, 2011 20:47
js faq link.
http://jibbering.com/faq/
@rlemon
rlemon / gist:1485848
Created December 16, 2011 12:24
quickie copy from home
// ==UserScript==
// @name Quickie
// @author rlemon
// @version 0.1
// @namespace rlemon.com
// @description Mini-SO bar in any page, anywhere, anytime.
// @include *
// ==/UserScript==
@rlemon
rlemon / gist:1492372
Created December 18, 2011 04:31
loadScript :p
function loadScript(url, callback) {
if(!url) {
return;
}
callback = typeof callback == 'undefined' ? function(){} : callback;
var script_elm = document.createElement('script');
script_elm.src = url;
script_elm.onreadystatechange = function() {
if (this.readyState == 'complete') {
callback.call();
@rlemon
rlemon / gist:1502840
Created December 20, 2011 19:22
public_files
<?php
/* Public files - accessible from http://rlemon.com/public_files/ */
if( isset($_GET['download']) ) {
if( file_exists($_GET['download']) ) {
$file = $_GET['download'];
header('Cache-Control: public');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename=$file');
header('Content-Type: application/zip');
header('Content-Transfer-Encoding: binary');
@rlemon
rlemon / gist:1634675
Created January 18, 2012 18:29
StackExchange Chat Blackout Bookmarklet - STOP SOPA
// Copy and paste this into the address bar or create a bookmark with this as the location.
// STOP SOPA!
javascript:$(".content").each(function(){var a=$(this),b=a.text().replace(/\S/g,"\u2587");a.text(b)});;
@rlemon
rlemon / gist:1636429
Created January 18, 2012 23:13
get all SE sites using the public API
function buildURL(page) {
return "http://api.stackexchange.com/2.0/sites?page=" + page + "&pagesize=100&filter=!LQukQ-uVfJGchnRIp_f0_O&callback=run";
}
function jsonp(url) {
var script_tag = document.createElement('script');
script_tag.src = url;
document.documentElement.appendChild(script_tag);
}
function run(json) {
se_site_list = se_site_list.concat(json.items);