Posts Tagged fun
Alt+F2
I just wrote a class in ruby for the backend for the ALT+F2 replacement i’m working on.
here is the class in ruby
#! /usr/bin/ruby
require 'pathname'
class Doer
def initialize
path=ENV['PATH'].to_s.split(":")
@li=""
@cmdlst=[]
@command=Hash.new()
path.each do |indpath|
inpath=Pathname(indpath)
files=inpath.children(false)
files.each do |fls|
testval=FileTest::executable?(File.join(indpath,fls))
if testval
cmdpth=File.join(indpath,fls).to_s
cmd=fls.to_s
@command.store(cmd,cmdpth)
@cmdlst.push(cmd+"\n")
end
end
end
@cmdlst=@cmdlst.join
end
def updatefind(str)
pattern=Regexp.compile("#{str}.*",Regexp::IGNORECASE)
@li=@cmdlst.scan(pattern)
return @li
end
end
You can try it by passing a string to the updatefind function for getting the list of commands similar to the give string.
For eg:
x=Doer.new()
puts x.updatefind(ARGV[0])
if you are passing the string from command line..
Hope ppl find this useful!!
will update soon with the Qt front end as soon i’m done with it.
Add comment April 12, 2009
Brainfuck++ Interpreter
Having fun coding on brainfuck and ruby for sometime, here is the result.
Jared Derinsk, had published a white paper on adding features to brainfuck. Having published his white paper for about 3 years (more…)
Add comment March 19, 2009
Finally stickers for the laptop..
I got a laptop from my aunt in US in the begining of november.. But since the university exams were going on i never had time to really juice it..
Here is the config of the laptop:
* 15.4″-diagonal widescreen WXGA (1280 x 800) UltraBright™ LCD screen
* Intel Core 2 Duo processor T5750 operating at 2.0GHz 2MB L2 cache
* 3GB of PC2-5300 DDR2 SDRAM memory (2GB + 1GB)
* 160GB 5400-rpm Serial ATA (SATA) hard drive
* Multiformat DVD drive with Double Layer support (reads/writes DVD±R/RW, DVD-RAM, DVD±R Double Layer, CD-R/RW); supports disc labeling on Labelflash media
* Intel Pro/Wireless 3945ABG (802.11a/b/g) wireless LAN
* Integrated 1.3-megapixel webcam, for live video chat and still photos
* 5-in-1 memory card reader: reads SD, MMC, xD, Memory Stick, Memory Stick Pro
* Intel Graphics Media Accelerator X3100 with up to 384MB shared memory
And finally when it is over the MACS group decided to conduct a fossmeet at our coll. And during this early organising stage we had a small fun of test printing stickers for the meet. And we had a wonderful result..
Here are some of the stickers i used from the sticker book we designed.
Almost all the stickers are taken from the free software sticker book.
Sarath (Slynux Guy) has designed 2 of them.. and one from a wallpaper that i found long time back..
Powered by ubuntu sticker is from system76
Here are some pics of stickers i used..



Add comment December 19, 2008


