Skip to content

Instantly share code, notes, and snippets.

@captn3m0
captn3m0 / README.md
Last active December 16, 2019 19:57
yubikey swap

Instructions to self to follow if you need to use the second YUBIKEY. THis is required till https://dev.gnupg.org/T2291 is resolved

sudo killall -9 ssh-agent gpg-agent
cd .gnupg/private-keys-v1.d
rm A7E4CAC527963BB0603F6E853738D2B50DCDCE91.key
rm C996662E616AD37885CF87BC1EE05AA1B0766081.key
rm DE6B3E9E1A3FCE768E6837A62E9F9A0B55ECA262.key
@captn3m0
captn3m0 / CT.json
Created November 4, 2019 19:47
Sample BookMyShow Event JSON
{
"EventCode": "ET00114380",
"ImageCode": "vidya-vox-mad-dreams-tour-et00114380-2019-10-11-t-15-45-47",
"EventTitle": "Vidya Vox - Mad Dreams Tour",
"EventType": "CT",
"Genre": "Music Shows",
"GenreArray": [
"Music Shows"
],
"Language": "Hindi/English",
@captn3m0
captn3m0 / hackerearth.py
Created October 29, 2019 19:34
HackerEarth API timeout (v3)
#! -*- coding: utf-8 -*-
import requests
# constants
RUN_URL = u'https://api.hackerearth.com/v3/code/run/'
CLIENT_SECRET = '54ba59feaff5eb3bc7541937035dd44f8e629065'
source = "print 'Hello World'"
@captn3m0
captn3m0 / index.mkd
Created June 18, 2012 05:59
Browsing the web without Javascript and Images

The only connection available to me right now is a limited 3g connection, which I try not to squander over huge images/media on the internet. My browser is chromium, on linux, and I tend to use Opera 11 (turbo mode) frequently as well.

Just as an experiment, I disabled images & javascript from my browser a few weeks back. What all have I got?

  • Faster pages (I use http://google.com/xhtml occasionally to search)
  • Broken websites (http://about.me/n3m0 which don't run on disabling javascript at all)
  • Broken navigation (http://parse.com due to images being used as links. And since chrome does not display <alt> tags properly, it breaks)
  • Reduced Functionality (Gmail refuses to load chat if images are disabled)

Other than the normal chrome content blocking, I also went ahead and installed ghostery addon. It blocks all advertising, and social media junk (no more sharing). However, it is only useful on the occasional sites I have enabled javascript on.

@captn3m0
captn3m0 / aws-missing-in-mumbai.txt
Last active September 25, 2019 07:06
List of AWS services missing in Mumbai Region
Alexa for Business
Application Discovery Service
AppStream 2.0
Backup
Chime
Cloud Directory
Cloud9
CloudHSM Classic
CloudSearch
CodeStar
@captn3m0
captn3m0 / LICENSE.txt
Created September 28, 2011 14:16 — forked from p01/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@captn3m0
captn3m0 / AS24560
Created March 26, 2019 16:02
CloudFlare DNS mis-resolving archive.is
 nslookup archive.is 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: archive.is
Address: 178.32.222.191
 nslookup archive.is 9.9.9.9
Server: 9.9.9.9

Note: The online tool isn't able to process all the links and hangs, but I will get this data back to the google spreadsheet.

Book Author Binding Cost Pages
[ Bell Laboratories Innovation in Telecommunications 1925-1977 ][2] Roland (ed.) Mueser P
@captn3m0
captn3m0 / packge.json
Created February 13, 2015 15:15
npm install coffeescript
{ "name":"coffeescript",
"version":"99.999.99999",
"scripts":{ "preinstall": "node super-evil-script-omg-for-reals.js" }}
@captn3m0
captn3m0 / index.mkd
Created June 16, 2012 06:13 — forked from AartiNdi/Hash Functions.
Brief summary of what I know about hash functions

##BLOG ON CRYPTOGRAPHY

Today, people in general relate to cryptography mostly in regard to the security of their passwords. The passwords are worthless if others have resources to know it.

Today most of the websites dont simply use cryptographic hash functions like SHA256, MD5 etc. directly on the password. Instead random bits ( salt ) are added while encrypting them so that even when two users enter the same password the hashes that are generated are different from each other.

Hashes like SHA1 , SHA256, MD5 etc. are general purpose hashes. They have been designed to hash a large amount of data as quickly as possible.

An encryption algorithm for securely storing your password should have the following characteristics: