Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kirsn
kirsn / marketingspam.md
Last active August 29, 2019 04:30
SMS Marketing spam in India

Report SMS Spam

On receipt of spam, send an SMS to 1909, with this message: the unsolicited commercial communication, XXXXXXXXXX, dd/mm/yy. XXXXXXXXXX - is the telephone number or header of the SMS, from which the unsolicited message / spam has originated. Details on TRAI site

SMS Spammers

This is a list of spam message headers / numbers

  • HP-CHPSRV
  • ID-CHSERV
  • BP-CHOPSR
  • IMPBRWRD

Keybase proof

I hereby claim:

  • I am kirsn on github.
  • I am kirsn (https://keybase.io/kirsn) on keybase.
  • I have a public key whose fingerprint is 7295 BAA6 21B5 B67C F72B 7240 5843 F8EA 9E95 E6EC

To claim this, I am signing this object:

@kirsn
kirsn / twitter_topics_filter.js
Created August 4, 2016 14:40
Remove tweets that contains terms or topics you are not interested in
// ==UserScript==
// @name Twitter - Filter
// @namespace tf
// @author http://twitter.com/kirsn
// @description Remove tweets which are of no interest
// @include https://twitter.com/
// @version 1
// @grant none
// ==/UserScript==
@kirsn
kirsn / test_validators.py
Last active March 26, 2016 20:17
Experiment with Hypothesis(https://hypothesis.readthedocs.org/en/master/index.html) and testing WEB2PY (http://web2py.com). These tests are only for a few web2py validators.
from decimal import Decimal
import json
import unittest
from hypothesis import given, strategies as st
from gluon import validators as vld
# JSON Test related code: http://jerith.github.io/pyconza2015-property-based-testing-with-Hypothesis/#/4/3
@kirsn
kirsn / linkedin-minimal.css
Created April 3, 2015 17:36
LinkedIn minimal removes unncessary images from the time-line. Use this with the Firefox Stylish Addon
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("linkedin.com") {
.nmp-sized {
display: none !important;
}
.shared-image {
display: none;
@kirsn
kirsn / cache_test_script.py
Created April 3, 2015 17:24
Web2py cache usage / test script
import time
def print_rows(rows):
print time.ctime()
for row in rows:
print row
db = DAL('sqlite://cache_test.db', pool_size=0)
db.define_table('t1', Field('name',type='string'))
@kirsn
kirsn / test_tld.py
Last active August 29, 2015 14:14
A quick test to test the tld module: https://github.com/barseghyanartur/tld
"""
A test to see whether the tld module recognizes all the valid domains.
"""
import requests # http://docs.python-requests.org/en/latest/
import tld # https://pypi.python.org/pypi/tld
# Mozilla curated db of tlds. Used by tld module
tlds = requests.get("https://publicsuffix.org/list/effective_tld_names.dat")
valid_urls = 0
@kirsn
kirsn / wikipedia-minimal-style
Created September 30, 2013 08:26
Wikipedia minimalist view
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("wikipedia.org") {
.collapsible-nav {
display: none !important;
}
div#content {
margin-left: 2em !important;
@kirsn
kirsn / getprismatic-style
Last active December 15, 2015 15:48
My styling for the getprismatic website. Works with Stylish firefox addon
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("getprismatic.com") {
/* The images are a major distraction*/
.doc-image img {
display: none !important;
}
}
@kirsn
kirsn / twitter-style.css
Last active June 15, 2016 04:36
My styling for the twitter website. Works with Stylish firefox addon
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
body{
font-family: "Georgia",serif !important;
background-color: white !important;
background-image: none !important;
font-size: 16px;
}