Skip to content

Instantly share code, notes, and snippets.

View davglass's full-sized avatar
💭
Taking a much needed sabbatical from Open Source. Please fork and carry on.

Dav Glass davglass

💭
Taking a much needed sabbatical from Open Source. Please fork and carry on.
View GitHub Profile
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
(function() {
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event;
var myEditor = new YAHOO.widget.Editor('editor', {
height: '300px',
width: '600px',
dompath: true
});
myEditor.on('toolbarLoaded', function() {
Code for adding gist BBCode tags to phpBB
BBCode Usage:
[gist={NUMBER}]{SIMPLETEXT}[/gist]
HTML Replacement
<h3>{SIMPLETEXT}</h3>
<script src="http://gist.github.com/{NUMBER}.js"></script>
<a href="http://gist.github.com/{NUMBER}">Click here to see the revision history on this Gist.</a>
function getPosition(el) {
if (document.documentElement.getBoundingClientRect) {
//They have getBoundingClientRect
var box = el.getBoundingClientRect();
if (isIE) {
//But we have to do something special for IE
}
} else {
//Other Browsers here..
}
function getPosition(el) {
if (el.getBoundingClientRect) {
//They have getBoundingClientRect
var box = el.getBoundingClientRect();
} else {
//Other Browsers here..
}
}
function getPosition(el) {
if (el.getBoundingClientRect) {
//They have getBoundingClientRect
var box = el.getBoundingClientRect();
if (typeof arguments.callee.offset != "number") {
var temp = document.createElement("div");
temp.style.cssText = "position:absolute;top:0;left:0";
document.body.appendChild(temp);
arguments.callee.offset = -temp.getBoundingClientRect().top;
document.body.removeChild(temp);
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
"set compatible
" Dav's Custom VIM Settings
" -------------------------
" Set no wrapping of lines
set nowrap
set number
let g:explVertical=1
var button = buttonReference; //This is a reference to your button
var el = document.createElement('span');
var el2 = document.createElement('span');
el.appendChild(el2);
button.parentNode.replaceChild(el, button);
var calClick = function() {
//Calendar was clicked..
};
var oButton = new YAHOO.widget.Button({
type: "menu",
id: "calendarpicker",
label: "Choose A Date",
var calClick = function() {
//Calendar was clicked..
};
var oButton = new YAHOO.widget.Button({
type: "menu",
id: "calendarpicker",
label: "Choose A Date",