Skip to content

Instantly share code, notes, and snippets.

View deepakjois's full-sized avatar
🎯
Focusing

Deepak Jois deepakjois

🎯
Focusing
View GitHub Profile
;; Testing
@deepakjois
deepakjois / bookjetty.rb
Created August 29, 2009 15:55
Script to download CSV export of Bookjetty 'wanted' books data
# Usage : ruby bookjetty.rb username password filename_to_save
require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new
agent.user_agent = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2"
page = agent.get("http://www.bookjetty.com")
login_form = page.forms[1]
# Login
twitter_user :: MVar (Maybe AuthUser)
twitter_user = unsafePerformIO (newMVar Nothing)
setTwitterUser :: IO ()
setTwitterUser = do
putStr "User name: "
u <- getLine
putStr "User password: "
p <- getLine
modifyMVar_ twitter_user (\ _ -> return $ Just (AuthUser u p))
class Canine
VERSION = '1.3'
def initialize(&block)
@commands = Hash.new
@default = @latest = :commands
@empty = nil
@auto = {
:commands => hash_command("commands","Show a list of commands",Proc.new {
@commands.each { |cmd| c = cmd[1]
name = c[:name].to_s
<div id="email"
><h2
>Email</h2
><p
>Send me an email at <script type="text/javascript"
>
<!--
h='&#x67;&#x6d;&#x61;&#x69;&#108;&#46;&#x63;&#x6f;&#x6d;';a='&#64;';n='&#100;&#x65;&#x65;&#112;&#x61;&#x6b;&#46;&#106;&#x6f;&#x69;&#x73;';e=n+a+h;
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'deepakDOTjoisATgmail.com'+'<\/'+'a'+'>');
// -->
From b4dba6068070b835b7d741d780751f36d3c1a575 Mon Sep 17 00:00:00 2001
From: Deepak Jois <deepak.jois@gmail.com>
Date: Thu, 31 Dec 2009 22:20:51 -0800
Subject: [PATCH] Fixing issue with datadir not being used when reading data
---
Yst/Data.hs | 10 +++++-----
Yst/Render.hs | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
From aff6dc832026aadc5645f47e443d223411a62de5 Mon Sep 17 00:00:00 2001
From: Deepak Jois <deepak.jois@gmail.com>
Date: Thu, 31 Dec 2009 23:41:23 -0800
Subject: [PATCH] Changing function call to use directoryGroupRecursive instead of directoryGroup to enable better organisation of layouts and templates
---
Yst/Render.hs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Yst/Render.hs b/Yst/Render.hs
From 380862a3686429338f7c7f76b5de16610ca1c44d Mon Sep 17 00:00:00 2001
From: Deepak Jois <deepak.jois@gmail.com>
Date: Fri, 1 Jan 2010 12:49:09 -0800
Subject: [PATCH 1/2] Adding dist folder to gitignore
---
.gitignore | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 .gitignore
% Look at the rendering:
% http://farm3.static.flickr.com/2755/4250942627_469615ffbc_o.png
\font\dnone="Nakula:script=deva" at 10pt
\font\dntwo="Sahadeva:script=deva" at 10pt
\font\dnthree="Akshar Unicode:script=deva" at 10pt
\font\dnfour="gargi:script=deva" at 10pt
\font\dnfive="Devanagari MT/AAT:script=deva" at 10pt
\baselineskip=1.5em
@deepakjois
deepakjois / roman.rb
Created January 12, 2010 08:32
Roman Numerals
# For numbers other than the basic digits :
#
# * Break the number into its place values in base 10 and convert each place
# value recursively. e.g 399 gets converted in 3 phases 300,90 and 9
#
# For each place value :
#
# * Identify the nearest position of place value in Roman digit sequence
#
# * Two different cases for every place value `x`, which have different rules