Skip to content

Instantly share code, notes, and snippets.

@captn3m0
captn3m0 / 01-README.md
Created Jul 15, 2021
ikea-check-script
View 01-README.md

Run using something like:

while sleep 300; do ikeacheck.sh;done

to run a check every 5 minutes. The script notifies you via notify-send. and puts a timestamp in ~/tmp/ikea.txt.

The curl command is stripped for reference here. To get the exact command, fill the PIN code form at the bottom of your shopping bag, open network tools, and capture the request made to /clickandcollect/in/receive/. Right click and "Copy-to-curl" on that request.

Once this succeeds, your account is added to the list, and if you open your browser sesssion again, you should'nt get the 818 error.

@captn3m0
captn3m0 / video.txt
Last active Jul 12, 2021
Video Speed Bookmarklet
View video.txt
The first reduces speed to 0.75x of current:
javascript:(function()%7BArray.from(document.getElementsByTagName('video')).forEach(vid%20%3D%3E%20vid.playbackRate%20*%3D0.75)%3B%7D())
The second increases speed to 1.25x of current:
javascript:(function()%7BArray.from(document.getElementsByTagName('video')).forEach(vid%20%3D%3E%20vid.playbackRate%20*%3D%201.25)%3B%7D())
You can press multiple times to get where you want.
@captn3m0
captn3m0 / README.md
Created Jun 30, 2021
Grant Security Alert Permission on GitHub Org Script
View README.md
  1. Set your Cookie header value in Line 3 of give-access.sh
  2. Set the team IDs that will have access on Line 24. You can add multiple teams.
  3. Edit the repos.txt file with one repository per line
  4. Make sure jq curl and pup are installed. (pup is available at https://github.com/EricChiang/pup)
  5. Run the script (./give-access.sh). A response code of 302 indicates the change was made successfully for that repo. Anything else is failure.

The only 3 cookies that you need to set are: __Host-user_session_same_site, user_session, _gh_sess

The values for user_session and _gh_sess are the same.

@captn3m0
captn3m0 / zulip.patch
Created Mar 31, 2021
zulip-5.6.0 PKGUILD patch
View zulip.patch
diff --git a/PKGBUILD b/PKGBUILD
index 0cce592..9c9fba6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=zulip-desktop-bin
_pkgname=zulip-desktop
-pkgver=5.4.3
+pkgver=5.6.0
@captn3m0
captn3m0 / gist:c7ccb025b874f22ebcc0f1356235d2ba
Last active Jul 16, 2021
list of cool missing indian datasets
View gist:c7ccb025b874f22ebcc0f1356235d2ba
Too many, so here's a list:
1. Indic books in public domain.
2. An updated shapefile of Indian PINcodes.
3. Updated version of the Indian PINs (the official one at data.gov.in is outdated)
4. MCA directors (DINs), company PANs in a graph dataset
5. SWIFT codes of all bank branches in India against their IFSC (I'm working on this!)
6. A public copy of the Vahan database that our government sold
7. List of all blocked domains in India along with the court order that blocked them
8. Database of all CCTVs in India along with latlong
@captn3m0
captn3m0 / whatsapp-web-and-kbd-tags.md
Last active Dec 13, 2020
A description of kbd tag in HTML and why WhatsApp Web should use them
View whatsapp-web-and-kbd-tags.md

The World Wide Web lets websites use semantic markup to tell exactly what they mean. This lets in both the computer and the user in on the secret.

For eg in HTML you can say:

Did the dog <em>really</em> eat your homework?

where the <em>really</em> part tells your browser that the “really” is emphasized. Your browser (Chrome/Firefox/..) will then showcase that emphasis as italics.

View planetebooks-kidnapped.xml
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<meta name="generator" content="Adobe InDesign 12.1" />
<meta name="cover" content="x1.png" />
<meta property="ibooks:specified-fonts">true</meta>
<dc:title>Kidnapped</dc:title>
<dc:date>2018-02-15T13:05:26Z</dc:date>
<dc:language>en-US</dc:language>
<meta property="dcterms:modified">2018-02-15T13:05:26Z</meta>
<dc:identifier id="bookid">urn:uuid:29d919dd-24f5-4384-be78-b447c9dc299b</dc:identifier>
</metadata>
@captn3m0
captn3m0 / 01-domains.md
Last active Nov 19, 2021
List of all Government of India domains
View 01-domains.md

gov.in (7259)

  • aavin.tn.gov.in
  • abnhpm.gov.in
  • agnii.gov.in
  • ap.gov.in
  • aponline.gov.in
  • appolice.gov.in
  • attendance.gov.in
  • cgg.gov.in
  • eccs.gov.in
@captn3m0
captn3m0 / README.md
Created Jul 10, 2020
BSNL-data-prices
View README.md
INR Data Days Valid Cost in USD Cost in USD/day
19 2GB 1 0.2527 0.2527
56 1.5GB/day 14 0.7448 0.0532
78 Unlimited Data with speed reduced to 80 Kbps after 3 GB/day 8 1.0374 0.12967
97 U/L data with speed reduced to 80 kbps after 2.0GB/day 18 1.2901 0.07167
98 Unlimited Data speed reduced to 40 Kbps after 2GB/day 22 1.3034 0.05925
198 2GB/day 54 2.6334 0.04877
448 Unlimited DATA with speed reduced to 40 Kbps after 1GB/Day 84 5.9584
@captn3m0
captn3m0 / 00-README.md
Last active Jun 17, 2020
What does it take to change text from British to American english?
View 00-README.md

The patch below details the changes between JK Rowling's differences in the British and American editions.

The changes do not include changes in quotes:

  • British edition uses single quotes for dialog
  • while the American edition uses double quotes).

Since all quotes are ignored for this calculation, the diff might look incorrect at some places.

The emdash differences might be my fault - need to double check those