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 / jQuery.md
Created January 19, 2012 18:37 — forked from Raynos/jQuery.md
Why you don't need jQuery

Why the jQuery Abstraction isn't needed.

(One needs some form of browser normalization so that modern features works, no-one is doubting that).

Abstractions that aren't needed

Selectors

QSA works (shim=sizzle). Besides selectors are generally bad practice. Favour node traversal, gEBI, gEBTN and gEBCN. (shim=domShim)

@rlemon
rlemon / gist:1648408
Created January 20, 2012 17:04
install phpmyadmin for ubuntu
sudo apt-get install libapache2-mod-auth-mysql phpmyadmin
@rlemon
rlemon / seabandoned.user.js
Created January 24, 2012 16:15
abandoned user script
// ==UserScript==
// @name LookAtMeINeedFlags
// @author rlemon, jamesgifford
// @version 0.2
// @namespace rlemon.com
// @description Flag SE Questions as Duplicates / Abandoned
// @include http://*stackoverflow.com/*
// @include http://*superuser.com/*
// @include http://*serverfault.com/*
// @include http://*askubuntu.com/*
@rlemon
rlemon / sechatinputfix.user.js
Created January 27, 2012 00:54
Stack Exchange Chat input fix.
// ==UserScript==
// @name Chat Input Fix
// @author rlemon
// @version 0.1
// @namespace rlemon.com
// @description Sets a cookie to remember your chat input width setting.
// @include http://chat.stackexchange.com/rooms/*
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
@rlemon
rlemon / gist:1688928
Created January 27, 2012 14:04
Apple-ish type menu bar

##HTML

<div class="main_menu">
    <ul>
        <li class="first dashboard">
            <a href="#">Dashboard</a>
        </li>
        <li class="inventory selected">
            <a href="#">Inventory</a>
@rlemon
rlemon / gist:1704213
Created January 30, 2012 12:43
selected fix...

##template

<?php
class Template {
	
	function load($view, $data = null)
	{
		$CI = &get_instance();

$headData = array_key_exists('styles', $data) ? array('styles' => $data['styles']) : array();

@rlemon
rlemon / gist:1713130
Created January 31, 2012 21:48
Key to centered forms..
/* is this friendly? I don't think so... merge after reviewing */
.center-form {
width: 100%;
}
.center-input, .center-options, .center-submit, h1, h2, h3 {
width: 400px;
padding: 0px 4px 6px 4px;
margin: 0 auto;
text-align: center;
@rlemon
rlemon / notifications.js
Created January 31, 2012 22:05
JS Notifier
/*
* Gnome / Growl type non-blocking notifications.
* Original work by http://opensource.srirangan.net/notifier.js/
* re-write by rlemon
*/
var Notifier = (function() {
var Notifier = function(config) {
this.config = {
defaultTimeOut: 5000,
position: ["top", "right"],
@rlemon
rlemon / gist:1725245
Created February 2, 2012 19:26
simple xhr object.
var xhr = {
xmlhttp: (function() {
var xmlhttp;
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (er) {
try {
@rlemon
rlemon / gist:1731934
Created February 3, 2012 19:35
ideas for json_storage
json_storage
hash
add [generates unique hash, creates storage area mapped to hash, returns hash]
remove [removes hash from server, as well as JSON objects]
<hash>
get [retreives JSON object and returns it to the callback]
callback
set [stores the values in the format below]
key=value [json=JSON]
callback [callback with message]