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 / wififail.txt
Created July 9, 2014 14:50
This is the output of my dmesg after i logged in. I disabled wifi and was unable to boot in. After much efforts i managed to enable wifi and this is what i got. Ubuntu is made by bastards. fucking bastards. idiots releasing untested and unstable drivers.
[ 265.138732] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138755] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138778] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138801] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138824] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138846] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138868] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138891] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138913] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138935] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
@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 / 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 / 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 / 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
@hj91
hj91 / gist:4202475
Created December 4, 2012 10:27
How to send mail using exim and command line prompt
user@localhost:~$ telnet localhost 25
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost ESMTP Postfix (Ubuntu)
mail from:root@localhost
250 2.1.0 Ok
rcpt to:harshad@localhost
250 2.1.5 Ok
@hj91
hj91 / lockcap.c
Created February 23, 2013 15:31
generating segfault and logging it in kern.log
/* this code is meant to run on MS DOS machines and uses bios bit setting to turn CAPS LOCK on or off */
/* it contains far keyword, which is not used in gcc */
#include <stdio.h>
void main()
{
char *kb;
kb = (char *)0x417;
*kb = 64;