Skip to content

Instantly share code, notes, and snippets.

View m13m's full-sized avatar
🎯
Focusing

Maqbool Khan m13m

🎯
Focusing
View GitHub Profile
@m13m
m13m / README.md
Last active August 29, 2015 14:24 — forked from ngauthier/README.md

I like Rdio and linux. Rdio works great in a browser except for one thing: keyboard shortcuts!!!

When coding, I like to be able to play/pause my music quickly, meaning I don't want to switch windows. I figured out a way to do this:

Google Chrome --app

First, I made a file in my ~/bin called rdio that runs:

google-chrome --app=http://rdio.com
@m13m
m13m / springer-free-maths-books.md
Created December 28, 2015 18:57 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@m13m
m13m / latency.txt
Created January 31, 2017 15:27 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@m13m
m13m / recover_source_code.md
Created March 12, 2017 08:08 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb

Webhooks vs Polling

What are webhooks, and why should you be using them? A webhook is a way to deliver real-time data to applications. Unlike traditional APIs where you need to poll for data frequently in order to get quasi real-time information, webhooks send data immediately.

You can think about webhooks like push notifications on your mobile phone. Rather than burning up the battery on your phone fetching information (polling) from applications to get updates, push notifications (webhooks) automatically send data based on event triggers. And just like push notifications, webhooks are less resource-intensive.

How Do Webhooks Work?

A webhook is an HTTP request (typically a POST sent to a pre-defined callback URI, where the server application is configured to handle the request on that URI. In many cases, webhooks are triggered by stimulus events, making them a faster and more efficient met

@m13m
m13m / Indian-Female-Names.csv
Created December 16, 2017 07:37 — forked from mbejda/Indian-Female-Names.csv
Dataset of ~14,000 Indian female names for NLP training and analysis. The names have been retrieved from public records. (name,gender,race)
name gender race
shivani f indian
isha f indian
smt shyani devi f indian
divya f indian
mansi f indian
mazida f indian
pooja f indian
kajal f indian
meena f indian
@m13m
m13m / Indian-Female-Names.csv
Created December 16, 2017 07:37 — forked from mbejda/Indian-Female-Names.csv
Dataset of ~14,000 Indian female names for NLP training and analysis. The names have been retrieved from public records. (name,gender,race)
shivani f indian
isha f indian
smt shyani devi f indian
divya f indian
mansi f indian
mazida f indian
pooja f indian
kajal f indian
meena f indian
@m13m
m13m / whatsappspam.js
Created January 7, 2018 12:56 — forked from flaredragon/whatsappspam.js
Whatsapp Spam Bot
/*
WhatsApp Web Spam Script written by flaredragon.
====================================================================================
DISCLAIMER: I do not take any responsibility for any damage caused with this script.
====================================================================================
Usage: Copy all of this script (Ctrl+A, Ctrl+C).Visit WhatsApp Web, select your
desired contact and Press Ctrl+Shift+I to and paste it in the console and press Enter.
(Imp Note - Whatsapp Controls the message sending rate so sending ~500 together may
cause your Whatsapp to hang so use the script smartly)
====================================================================================

LambdaConf Travel Notes

The missing manual!

Anyway… The first thing you should know is that you're not the only one who couldn't fly into Boulder directly. Denver International Airport is the closest and only major airport associated with Boulder. It's only about 50 miles away from Boulder, so that's not too much of a hardship, especially since transit connections are so good (more on this in a bit).

The next thing you should know is that Denver International Airport (DIA) is not actually in Denver. DIA is slightly closer to Denver than it is to Boulder, but honestly not by that much. So if you were planning on taking advantage of your flight into "Denver" to site-see in the city… uh, that's probably not going to happen. In any event, while Denver is quite nice, Boulder is better in almost every detail except its lack of skyscrapers.

Denver (for… reasons)