Skip to content

Instantly share code, notes, and snippets.

View cheeaun's full-sized avatar
📬
Subscribe to my newsletter https://cheeaun.substack.com/

Chee Aun cheeaun

📬
Subscribe to my newsletter https://cheeaun.substack.com/
View GitHub Profile
/*
* PolyPage 0.5 - for Mootools
*
* Copyright (c) 2007 New Bamboo (new-bamboo.co.uk)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Additional help and information can be found at: http://code.new-bamboo.co.uk/polypage
*
@cheeaun
cheeaun / cross-browser-display-inline-block.css
Created February 5, 2009 05:18
Cross-browser display: inline-block
/*
* Cross-browser display: inline-block
*
* References:
* - http://foohack.com/2007/11/cross-browser-support-for-inline-block-styling/
* - http://www.getonthenet.eu/css-howto-cross-browser-inline-block/
*/
a{
display: -moz-inline-box; /* Firefox 2 */
@cheeaun
cheeaun / .gitconfig
Created February 8, 2009 14:49
.gitconfig with custom merge tools
[user]
email = [email protected]
name = Your Name
[core]
autocrlf = false
[merge]
tool = diffmerge
[mergetool "tortoisemerge"]
cmd = C:/Program\\ Files/TortoiseSVN/bin/TortoiseMerge.exe /base:\"$BASE\" /mine:\"$LOCAL\" /theirs:\"$REMOTE\" /merged:\"$MERGED\"
keepBackup = false
@cheeaun
cheeaun / SciTEUser.properties
Created February 18, 2009 13:04
SciTE user config
# Window sizes and visibility
position.left=
position.top=
position.width=
position.height=
split.vertical=0
toolbar.visible=1
tabbar.hide.one=1
statusbar.visible=1
output.initial.hide=1
@cheeaun
cheeaun / border-radius.css
Created March 2, 2009 03:17
Cross-browser border-radius except IE6/7
div{
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-ms-border-radius: 5px;
}
@cheeaun
cheeaun / Element.isVisibleHidden.js
Created March 3, 2009 14:34
Mootools Element extras: isVisible and isHidden
/*
* Inspired from http://github.com/jeresig/sizzle/commit/7631f9c3f85e5fa72ac51532399cb593c2cdc71f
* and this http://github.com/jeresig/sizzle/commit/5716360040a440041da19823964f96d025ca734b
* and then http://dev.jquery.com/ticket/4512
*/
Element.implement({
isHidden: function(){
var w = this.offsetWidth, h = this.offsetHeight,
@cheeaun
cheeaun / html5-ie.js
Created March 16, 2009 03:22
HTML5 elements NOW!
/* HTML5 elements for IE
* more reference from: http://remysharp.com/2009/01/07/html5-enabling-script/
*/
(function(){
var e = 'abbr article aside audio bb datagrid datalist details dialog eventsource figure footer header mark menu meter nav output progress section time video'.split(' ');
var i = e.length;
while (i--) document.createElement(e[i]);
})();
@cheeaun
cheeaun / delicious.custombuttons.js
Created March 21, 2009 03:47
Custom Buttons JS
var width = 550;
var height = 550;
var left = parseInt( ( screen.availWidth / 2 ) - ( width / 2 ) );
var top = parseInt( ( screen.availHeight / 2 ) - ( height / 2 ) ) - 20;
var url = encodeURIComponent(content.location.href);
var title = encodeURIComponent(content.document.title);
var f = 'http://delicious.com/save?url=' + url + '&title=' + title + '&v=5&';
if (!content.open(f + 'noui=1&jump=doclose', 'deliciousuiv5', 'location=yes,links=no,scrollbars=no,toolbar=no,top=' + top + ',left=' + left + ',width=' + width + ',height=' + height)) location.href = f+'jump=yes';
@cheeaun
cheeaun / gist:93816
Created April 12, 2009 01:38
Change column name in SQLite
ALTER TABLE table ADD newColumn INTEGER;
UPDATE table SET newColumn = oldColumn;
@cheeaun
cheeaun / alt-keys.ahk
Created April 19, 2009 13:07
AutoHotkey script to map Alt key to work like Ctrl AKA Mac-style Cmd key, on Windows.
LAlt & x::Send ^x
LAlt & c::Send ^c
LAlt & v::Send ^v
LAlt & s::Send ^s
LAlt & w::Send ^w
LAlt & q::Send !{F4}
LAlt & f::Send ^f
LAlt & t::Send ^t
LAlt & z::Send ^z
LAlt & r::Send ^r