Skip to content

Instantly share code, notes, and snippets.

@tagawa
tagawa / sessionStorage.js
Created June 6, 2012 06:31
sessionStorage polyfill
/*
* Based on: http://www.quirksmode.org/js/cookies.html
* and https://github.com/wojodesign/local-storage-js/blob/master/storage.js
* and https://gist.github.com/350433
* License: http://www.opensource.org/licenses/MIT
*/
(function(window) {
'use strict';
window.sessionStorage = window.sessionStorage || {
@seanbehan
seanbehan / loop.php
Created May 2, 2012 21:29
The Loop
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<div class="<?php the_class(); ?>">
<a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a>
<?php the_time(); ?>
<p><?php the_content(); ?></p>
</div>
<?php endwhile; endif; ?>
@remi
remi / update-chromium-mac.rb
Created March 24, 2011 14:26
Running this file update /Applications/Chromium.app to the latest Chromium build.
#!/usr/bin/env ruby
require "open-uri"
if ARGV.first
build_id = ARGV.first
else
build_id = open("http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/LAST_CHANGE") { |data| data.read }
end
build_url = "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/#{build_id}/chrome-mac.zip"
@jehiah
jehiah / get_latest_chromium.sh
Created February 18, 2011 15:49
script to download the latest chromium build nightly
#!/bin/sh
## this is a quick and dirty script to automagically install the latest chromium build on OSX 10.5
## you can set this up as a nightly cron job, or run manually from the command line
# USAGE:
# save script to your home directory aka /Users/$USER/
# open up a command prompt (aka /Applications/Utilities/Terminal)
# run manually from the command line whenever you want the most recent chromium build
# $ sh get_latest_chromium.sh
# start it as a nightly task (runs at 1am or edit the plist below)
@thomaspeklak
thomaspeklak / update_chromium_nightly_mac.sh
Created September 23, 2010 21:45
updates chromium to the latest nightly build
VAR=$(curl http://build.chromium.org/f/chromium/snapshots/Mac/LATEST | sed 's/\(.*\)/http:\/\/build.chromium.org\/f\/chromium\/snapshots\/Mac\/\1\/chrome-mac.zip/')
wget $VAR
unzip chrome-mac.zip
cp -r chrome-mac/Chromium.app /Applications/
rm -rf chrome-mac chrome-mac.zip