Skip to content

Instantly share code, notes, and snippets.

@iambibhas
iambibhas / pstat-chain.py
Last active Aug 16, 2020
Takes a profile file, a method name and depth, and shows you the chain of callers of the method
View pstat-chain.py
import pstats
import re
import sys
from io import StringIO
"""
E.g.
python pstats-chain.py GET.foobar.com.testurl.46689ms.1597427246.prof 'time.sleep' 10
@iambibhas
iambibhas / recipe.xml
Last active Nov 19, 2020
Tasker recipe to forward SMS to Telegram group
View recipe.xml
<TaskerData sr="" dvi="1" tv="5.8.3">
<Profile sr="prof2" ve="2">
<cdate>1565066300570</cdate>
<edate>1567394645768</edate>
<id>2</id>
<mid0>3</mid0>
<nme>Bank SMS Forward</nme>
<Event sr="con0" ve="2">
<code>7</code>
<pri>0</pri>
View vscode.settings
// Place your settings in this file to overwrite the default settings
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/*.pyc": true,
"**/*.pyo": true
},
View googlemaps.md

Background

About a year back there was this widespread spamming attempt in Bangalore where there was non-existent places popping up everywhere with the name of "Agarwal Pakcers and Movers". All of these places looked like this -

As the image and the description suggests, this place is a restaurant. But somebody edited this and modified the name, category, address and in some cases, phone numbers.

I edited and reported as many as I can. And after a month or so, they were gone.

Current scenario

@iambibhas
iambibhas / stories_sync.json
Created Jul 3, 2016
JSON for syncing stories
View stories_sync.json
{
"stories": [{
"synced": 0,
"sysid": "",
"group_id": 24,
"respondent_type": "PR",
"created_at": 1467503240213,
"school_id": 1917,
"_id": 1,
"user_id": 157,
View kontact_error.log
06-14 16:20:23.237 12066-12564/in.org.klp.kontact V/FetchSurveyTask: Survey Insert Error: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: survey._id (code 1555)
06-14 16:20:23.237 12066-12564/in.org.klp.kontact V/FetchSurveyTask: Survey Insert Error: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: survey._id (code 1555)
06-14 16:20:23.238 12066-12564/in.org.klp.kontact V/FetchSurveyTask: Survey Insert Error: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: survey._id (code 1555)
06-14 16:20:23.814 12066-12564/in.org.klp.kontact E/SQLiteLog: (1) table question has no column named school_type
06-14 16:20:23.814 12066-12564/in.org.klp.kontact V/FetchSurveyTask: Questiongroup Insert Error: android.database.sqlite.SQLiteException: table question has no column named school_type (code 1): , while compiling: INSERT INTO question(options,text,school_type,_id,type,key) VALUES (?,?,?,?,?,?)
06-14 16:20:23.827 12066-12564/in.org.klp.kon
@iambibhas
iambibhas / ekstep.json
Created Nov 24, 2015
Sample data from EkStep
View ekstep.json
[
{
"tags": [],
"uid": "7492259d-e3ef-4f90-99a1-5ad5c53e9958",
"sid": "87804aad-1711-4422-b367-32833e0f0f0d",
"ts": "2015-10-08T10:24:49+05:30",
"edata": {
"eks": {
"length": 63055.0
}
@iambibhas
iambibhas / facebook_url_redirect_avoid.js
Last active Nov 20, 2015
UserScript to avoid Facebook's URL director
View facebook_url_redirect_avoid.js
// ==UserScript==
// @name Facebook URL Redirector Bypass
// @namespace in.bibhas
// @include https://*.facebook.com/*
// @version 1
// @grant none
// ==/UserScript==
si = window.setInterval(clearanchors, 2000);
function clearanchors(){
anchors = document.getElementsByTagName('a');
View bengali_cheatsheet.json
{
"id" : "bengali_cheat_sheet",
"name" : "Bengali Cheat Sheet",
"metadata" : {
"sourceName" : "Wikitravel Bengali Phrasebook",
"sourceUrl" : "http://wikitravel.org/en/Bengali_phrasebook"
},
"aliases": [
"bangla", "bangla phrases", "bengali phrases", "english to bengali",
"basic bengali phrases", "basic bengali"
@iambibhas
iambibhas / slackrediravoid.js
Created Jul 11, 2015
Avoid Slack's URL Redirect
View slackrediravoid.js
// ==UserScript==
// @name Avoid Slack Redirect
// @namespace slackrediravoid
// @include https://*.slack.com/*
// @version 1
// @grant none
// ==/UserScript==
si = window.setInterval(clearanchors, 2000);
function clearanchors(){
anchors = document.getElementsByTagName('a')
You can’t perform that action at this time.