Skip to content

Instantly share code, notes, and snippets.

View alagu's full-sized avatar

Alagu alagu

View GitHub Profile
<li class="result-block <%= result[:type] %>">
<div class="subject">
<%= yield :subject %>
</div>
<div class="snippet">
<%= yield :snippet %>
</div>
</li>
@alagu
alagu / gist:1228425
Created September 20, 2011 05:37 — forked from pokeb/gist:150447
An example showing how to manage a queue with ASIHTTPRequest
//
// MyController.h
//
// Created by Ben Copsey on 20/07/2009.
// Copyright 2009 All-Seeing Interactive. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <GHUnit/GHUnit.h>
@class ASINetworkQueue;
@alagu
alagu / gist:178319
Created August 31, 2009 06:43 — forked from stammy/gist:60892
javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('link');for(i=0;i%3Ca.length;i++){s=a[i];if(s.rel.toLowerCase().indexOf('stylesheet')%3E=0&&s.href)%20{var%20h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');s.href=h+(h.indexOf('?')%3E=0?'&':'?')+'forceReload='+(new%20Date().valueOf())}}})();
@alagu
alagu / gist:138700
Created July 1, 2009 09:20
Delicious account copier
import getpass
from pydelicious import DeliciousAPI, DeliciousItemExistsError
sourceUser = raw_input("Username [source]: ")
sourcePasswd = getpass.getpass("Password [source]: ")
sourceDlcs = DeliciousAPI(sourceUser, sourcePasswd)
print "Getting all bookmarks from source:" + sourceUser
sourceBkmrks = sourceDlcs.posts_all()['posts']
print "Done getting bookmarks"
fromTag = ' from:' + sourceUser
destUser = raw_input("Username [destination]: ")