Skip to content

Instantly share code, notes, and snippets.

oslego / browserUtil.js
Created Jul 17, 2009
Detect browser CSS capabilities by looking for DOM property references
View browserUtil.js
* @author Razvan Caliman,
* wrapper for browser sniffing / capabilities check methods
var browser = {};
oslego / Simple CSS Liquid Grid
Created Jul 30, 2009
A simple CSS layout grid that suits liquid layouts
View Simple CSS Liquid Grid
View N Zakas's JavaScript lazy loader
function loadScript(url, callback){
var script = document.createElement("script")
script.type = "text/javascript";
if (script.readyState){ //IE
script.onreadystatechange = function(){
if (script.readyState == "loaded" ||
script.readyState == "complete"){
script.onreadystatechange = null;
View mysql_database_backup
mysqldump -h localhost -u username -ppassword dbname1 dbname2 --compress --default-character-set=utf8 | gzip -c --best > `date +%Y_%m_%d_dbname.sql.gz`
oslego / Apache gzip
Created Nov 19, 2009
Apache gzip filter
View Apache gzip
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/javascript text/javascript text/css application/x-javascript
View Requirements for mechanzie on Unbuntu
apt-get install ruby-dev
gem install hoe
sudo apt-get install libxml2-dev libxslt1-dev
apt-get install libopenssl-ruby
gem install nokogiri
gem install mechanize
oslego / jQuery Custom Events Bubble.js
Created Dec 11, 2010
Custom jQuery events triggered on non-DOM elements that bubble (propagate) up to the 'document'
View jQuery Custom Events Bubble.js
<script type="text/javascript" src=""></script>
<script type="text/javascript">
//non-DOM object events that propagate up to the 'document'
oslego / YQL Podcast
Created Dec 14, 2010
Using YQL to get titles and tracks filtered by a search term
View YQL Podcast
select channel.item.enclosure.url, channel.item.title from xml where url='' and channel.item.title like "%Corral%"
oslego / SafariKeypressEvents.js
Created Feb 8, 2011
Method for handling keypress events on non-input elements in Safari (and other webkit-based browsers)
View SafariKeypressEvents.js
var div = document.getElementById("demo");
div.setAttribute("tabIndex", 0);
div.addEventListener("keypress", function(e){
oslego / gist:854869
Created Mar 4, 2011
Bookmarklet Template: Loader
View gist:854869
You can’t perform that action at this time.