This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/dghubble/go-twitter/twitter" | |
"github.com/dghubble/oauth1" | |
) | |
func main() { | |
consumerKey := "KEY" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/dghubble/go-twitter/twitter" | |
"github.com/dghubble/oauth1" | |
) | |
func main() { | |
consumerKey := "KEY" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# Echo client program | |
import socket | |
def parse_file(fName): | |
list = [] | |
with open(fName) as f: | |
for line in f: | |
list.append(line.strip()) | |
return list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Capture screenshot via adb on Samsung Galaxy Devices. (Tested on Galaxy mini 2.3.4 NO ROOT) | |
#Stores the screenshot on the device (/mnt/sdcard/Screencapture) | |
alias droidshot='adb shell am startservice -a com.sec.android.app.screencapture -n com.sec.android.app.screencapture/.ScreenCaptureService' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'mechanize' | |
agent = Mechanize.new | |
url = "http://dev.origami.org/diagram.cfm?CurrentPage=" | |
base = "http://dev.origami.org/" | |
21.times do |count| | |
puts url+"#{count}" | |
page = agent.get(url+"#{count+1}") | |
page.links.each do |l| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'open-uri' | |
#wget could have been used but then it would | |
# 1) Make it dependent on an external program | |
# 2) Make it a one-liner ;) | |
# | |
#This script when executed will start downloading all the prag-mags | |
#in the current directory. | |
if ARGV.count == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# find-s.rb | |
# | |
# Copyright 2012 AbdulKarim Memon <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder