Skip to content

Instantly share code, notes, and snippets.

@ecarnevale
ecarnevale / ihardlyknowher.user.js
Created March 10, 2009 13:14
A greasemonkey script to automatically redirect a flickr page to IHardlyKnowHer
// ==UserScript==
// @name IHardlyKnowHer
// @namespace http://emanuelcarnevale.com
// @include http://flickr.com/*
// @include http://www.flickr.com/*
// @exclude http://www.flickr.com/photos/friends/*
// ==/UserScript==
function get(url, cb) {
GM_xmlhttpRequest({
method: "GET",
var noun_type_destination = new CmdUtils.NounType( "destination", ['clipboard', 'selected text', 'displayed message'] );
CmdUtils.CreateCommand({
name: "lmgtfy",
takes: {"Something you have to search about because your friends are lazy": noun_arb_text},
preview: function(pblock, query) {
searchQuery = jQuery.trim(query.text);
if (searchQuery.length < 1) {
pblock.innerHTML = "Gives you a link to a lmgtfy.com search.";
require "net/http"
require "uri"
base_url = 'www.instapaper.com'
path_url = '/api/authenticate/'
username = 'instatest'
pwd = ''
#1st version
#!/usr/bin/env ruby
unless ARGV[0]
puts 'Usage: newpost "the post title"'
exit(-1)
end
date_prefix = Time.now.strftime("%Y-%m-%d")
postname = ARGV[0].strip.downcase.gsub(/ /, '-')
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile"
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 Sam Hocevar
# 14 rue de Plaisance, 75014 Paris, France
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@interface Base58Encoder : NSObject {
}
+ (NSString *)base58EncodedValue:(long long)num;
@end
# Back up your iTunes library to S3
git clone git://github.com/sstephenson/mackerel.git
ruby -rubygems mackerel/examples/itunes_backup.rb amazon-s3://YOUR_ACCESS_KEY_ID:YOUR_SECRET_ACCESS_KEY@s3.amazonaws.com/YOUR_BUCKET_NAME/itunes.mackerel
// This sqlite3_exec limits the database to 50 DB pages (about 1.5Kb each)
// Huge memory win on iPhone.
if(sqlite3_exec(myDatabsae, "PRAGMA CACHE_SIZE=50", NULL, NULL, NULL) != SQLITE_OK)
NSLog(@"Couldn't set cache size: %s", sqlite3_errmsg([self.database sql]));
# PRINT TO KINDLE in Mac OSX (for Kindle DX)
#
# HUH?
# - Kindle file depository:
# - drag any supported Kindle file to a local folder
# - file will be automatically transfered whenever Kindle is connected
# - "Print To Kindle" Print menu option (PDF):
# - when Kindle is connected it will print as PDF straight to the Kindle (from anywhere)
# - when Kindle is not connected, it will print to the local folder and is transfered as soon as Kindle is connected
/*
* Fluidy-hood
* author: Emanuel Carnevale
* http://github.com/ecarnevale/fluidy-hood
*
* an underground interwho
* aiming at the awesomeness of Hoodwink.d by _why the Lucky Stiff
*
* version 0.00001 a.k.a. Proof of Concept
* PUT and POST on the go.