Skip to content

Instantly share code, notes, and snippets.

[khan-debug://exercise/finding-1-on-the-number-line](khan-debug://exercise/finding-1-on-the-number-line)
[khan-debug://exercise/understanding-angle-addition-formulas](khan-debug://exercise/understanding-angle-addition-formulas)
[khan-debug://exercise/using-probability-to-make-fair-decisions](khan-debug://exercise/using-probability-to-make-fair-decisions)
[khan-debug://exercise/solving-matrix-equations](khan-debug://exercise/solving-matrix-equations)
[khan-debug://exercise/writing-numerical-inequalities](khan-debug://exercise/writing-numerical-inequalities)
[khan-debug://exercise/creating-line-plots-1](khan-debug://exercise/creating-line-plots-1)
[khan-debug://exercise/creating-line-plots-2](khan-debug://exercise/creating-line-plots-2)
[khan-debug://exercise/adding-and-subtracting-on-the-number-line-word-problems](khan-debug://exercise/adding-and-subtracting-on-the-number-line-word-problems)
[khan-debug://exercise/addition-and-subtraction-word-problems-within-20--level-2](khan-debug://exercise/addition-and-sub
/**
Bookmarket to get movie url from einthusan.com website for download.
Note, this works because einthusan.com uses a simple HTTP GET request to retrieve movie file.
Simply download the URL in the popup using your browser or cURL.
*/
// Bookmarklet:
// javascript:(function()%7B%2F**Bookmarket%20to%20get%20movie%20url%20from%20einthusan.com%20website%20for%20download.Note%2C%20this%20works%20because%20einthusan.com%20uses%20a%20simple%20HTTP%20GET%20request%20to%20retrieve%20movie%20file.*%2Fvar%20getMovieURL%20%3D%20function()%20%7Bvar%20scriptElements%20%3D%20document.getElementsByTagName(%22script%22)%3Bfor%20(var%20i%3D0%3B%20i%3CscriptElements.length%3B%20i%2B%2B)%20%7Bvar%20tempScriptContent%20%3D%20scriptElements%5Bi%5D.textContent%3Bif%20(tempScriptContent)%20%7Bvar%20matches%20%3D%20tempScriptContent.match(%2Fhttp%3A%5C%2F%5C%2F%5Cd.*%3Fmovies_hindi.*%3F'%2F)%3Bif%20(matches)%20%7Bvar%20tempString%20%3D%20matches%5B0%5D%3Breturn%20tempString.substring(0%2C%20tempString.length-1)%3B%7D%7D%7Dre
function assert(cond) {
if (cond) {
throw "Assertion Error";
}
}
function encodeArbitraryBase(value, base) {
assert(typeof value == "number");
assert(typeof base == "number");
assert(value === parseInt(value))
@vivekseth
vivekseth / free-read
Created October 28, 2014 21:54
Bypass Paywall on Most Websites (Bookmarklet)
/**
BOOKMARKLET IS AT BOTTOM OF COMMENT
Many paywalled websites like the New York Times disable their paywall when you access their content from social media or google. News websites want you to pay for their content, but they don't want to block traffic from search engines and social media because that would kill a large chunk of their traffic.
If you encounter a paywall when trying to view an article, all you need to do is find that article via google and click on the link from there. The paywall will be disabled and you will be able to view the article unfettered.
This bookmarklet streamlines that process. It scrapes the URL of the article for a unique identifier and searcesh google for that identifier. Google likely throw back the article you wanted to view as one of the top search results.
** Attention NYT and Others **
@vivekseth
vivekseth / readme.md
Last active August 29, 2015 14:08
Facebook Invite All Bookmarklet

Facebook Invite All Bookmarklet

Make a bookmark.

Edit it and replace URL with whats below.

Click on it when you're inviting friends to an event.

If not all your friends are selected, click again.

# Monitor Internet Connection #
import os
import sys
import time
import datetime
import argparse
RECONNECT_COMMAND = """
networksetup -setairportpower en0 off;
sleep 1;
./arch/i386/kernel/Makefile
./arch/i386/kernel/entry.S
./include/asm-i386/unistd.h
./include/linux/double_cpu_time.h
./include/linux/sched.h
./kernel/double_cpu_time.c
./kernel/Makefile
./kernel/sched.c
<!--
The format i've described here is not set in stone. Feel free to use revised format as you feel necessary.
Using 'r250-' prefix to ensure no conflicts with existing tags.
Using general XML format so that rendering for iPhone and Android can be independent of each other.
-->
@vivekseth
vivekseth / gist:6fe532b21996212e6758
Last active August 29, 2015 14:18
ER Diagram Notes
## ER Diagrams ##
triangle - ISA
rectangle - entity
oval - attribute
diamond - relation
[A] -> <B> : Key Constraint. Each entity in A uniquely identifies a relation in B
[A] -> <B> <- [C] : 1:1
[A] -> <B> - [C] : many:1
{
"status": "200",
"payload": [
{
"title": "Nobis voluptatem ipsa fugit dolor cumque.",
"body": "Iusto ex vel mollitia aliquid. Voluptas perferendis sunt. Inventore tempore ea dolor repellat fugiat et voluptatem. Culpa reiciendis quia ratione illo cupiditate.",