Skip to content

Instantly share code, notes, and snippets.

View hj91's full-sized avatar
:octocat:

Harshad Joshi hj91

:octocat:
View GitHub Profile
@hj91
hj91 / identica_reply.py
Created April 27, 2011 11:54
A small python snippet to parse identi.ca replies for a particular user
# A small python snippet to parse identi.ca replies for a particular user..in this case, it is HJ91
# (c) 26 April 2011, Harshad Joshi
import urllib2
import feedparser
a=urllib2.urlopen("http://identi.ca/api/statuses/mentions/hj91.rss")
b=feedparser.parse(a)
for i in range(len(b.entries)):
@hj91
hj91 / pull_fb_notifications.py
Created May 2, 2011 12:18
Get Facebook Notifications on sms using Python
# This code is meant to show how to get latest notifications on sms using python-gammu library
# Very simple and primitive code..
# To Do - Create a mysql backend and run this program every 10 minutes. The notifications sent before shoudent be sent on sms again (i need someone to write code for that ;)
import feedparser
import gammu
import urllib2
import gammu
sm = gammu.StateMachine()
@hj91
hj91 / identca_class.py
Created June 6, 2011 06:17
Generic class to enable posting and eading mentions on identi.ca or statusnet microblogging sites
#!/usr/bin/env python
# * coding: utf-8 *
# (c) Harshad Joshi, 2011
# Post on identi.ca using CLI
import json, urllib2
from urllib import urlencode
import sys,feedparser
@hj91
hj91 / identca_gist.py
Created June 8, 2011 08:19
Getting subscriber id for identi.ca and statusnet
import feedparser,urllib2
#this is my user id..it will be different for you
a=urllib2.urlopen("http://identi.ca/api/statusnet/app/subscriptions/32987.atom")
b=feedparser.parse(a)
c=[]
for i in b.entries:
print i.title,i.id
@hj91
hj91 / identica_class.py
Created June 13, 2011 09:12
CLI version to check identi.ca updates, mentions and status..no need of web browser..ToDo - make it realtime and refactor some code..
#!/usr/bin/env python
# * coding: utf-8 *
# (c) Harshad Joshi, 2011
# http://identi.ca/hj91
import json, urllib2
from urllib import urlencode
import sys,feedparser
@hj91
hj91 / identica_class_v2.py
Created June 18, 2011 10:01
Just decorated the code with new function...needs to classify it soon..
#!/usr/bin/env python
# * coding: utf-8 *
# (c) Harshad Joshi, 18 Jul 2011
# Little refactoring done
# ToDo
# Give it some error and exception handling and make it as versatile as it can become.
import json, urllib2
from urllib import urlencode
import sys,feedparser
@hj91
hj91 / Tweepy_CLI_example.py
Created June 25, 2011 10:49
Example of using Twitter api with Tweepy library
#!/usr/bin/env python
#(c) Harshad Joshi, 2011
#firewalrus [AT] gmail DOT com
import sys
import tweepy
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
@hj91
hj91 / speaker.bas
Created June 25, 2011 17:00
QBasic code to generate sounds through computer speaker.
10 REM
20 PLAY "CDGFABC"
30 END
@hj91
hj91 / Gorillas.bas
Created June 25, 2011 17:07
QBasic Gorillas
' Q B a s i c G o r i l l a s
'
' Copyright (C) IBM Corporation 1991
'
' Your mission is to hit your opponent with the exploding banana
@hj91
hj91 / myrr1.c
Created June 25, 2012 05:18
I found this code on my old computer. It probably logs udp packets. This verion detects a traceroute done from/on your computer
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#ifndef __USE_BSD
#define __USE_BSD