Skip to content

Instantly share code, notes, and snippets.

View akash0x53's full-sized avatar
๐Ÿš€
Watching Rockets

Akash Shende akash0x53

๐Ÿš€
Watching Rockets
View GitHub Profile
@techmaniack
techmaniack / fbtweet.rb
Created September 23, 2012 17:31
Selective tweets post
pushed_tweets=[]
while true
Twitter.user_timeline("techmaniack").each do |item|
if !pushed_tweets.include?item.id
me.feed!(:message => item.text) if item.text.include?"#fb"
puts "POSTING TWEET"
puts item.text
pushed_tweets << item.id
else
puts "NOT POSTING"
@techmaniack
techmaniack / smart_push.rb
Created August 12, 2012 23:19
Smart `adb push`
#!/usr/bin/env ruby
# Ever tried to use wildcard (*) while pushing multiple files to your droid via adb?
# This small little script helps you do it. Of Course there are many ways to do it
# but one is for the ruby-istas :)
# SAMPLE USAGE: ruby smart_push.rb *.pdf books # push all pdf's to /mnt/sdcard/books
ARGV.length > 1 ? (dest = "/mnt/sdcard/#{ARGV[-1]}"; ARGV.pop) : dest = "/mnt/sdcard/"
ARGV.each do |item|
puts File.basename("#{item}") + " is being pushed"
@techmaniack
techmaniack / isbn_decoder.rb
Created July 29, 2012 16:09
ISBN decoder
#!/usr/bin/env ruby
#-------------------------------------------------------------------------------
# Name: isbn_decoder.rb
# Purpose: Fetch title from ISBN .
#
# Author: AbdulKarim Memon
#
# Created: 29/07/2012
# Copyright: (c) AbdulKarim Memon 2012