Skip to content

Instantly share code, notes, and snippets.

@vivekseth
vivekseth / websites.csv
Created August 21, 2023 20:28 — forked from bejaneps/websites.csv
List of top 1000 websites
1 fonts.googleapis.com 10
2 facebook.com 10
3 twitter.com 10
4 google.com 10
5 youtube.com 10
6 s.w.org 10
7 instagram.com 10
8 googletagmanager.com 10
9 linkedin.com 10
10 ajax.googleapis.com 10
@vivekseth
vivekseth / top-1000-websites.json
Created August 21, 2023 20:27 — forked from dlucian/top-1000-websites.json
Top 1000 Websites
[
{
"position": 1,
"domain": "youtube.com",
"count": 361515143,
"etv": 460411425.18914586
},
{
"position": 2,
"domain": "facebook.com",
@vivekseth
vivekseth / top_websites
Created August 21, 2023 20:27
top_websites
This file has been truncated, but you can view the full file.
google.com
youtube.com
tmall.com
baidu.com
qq.com
sohu.com
facebook.com
taobao.com
360.cn
jd.com
@vivekseth
vivekseth / recover_source_code.md
Created March 12, 2017 15:58 — 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
@vivekseth
vivekseth / sompy_1.ipynb
Created April 20, 2016 15:37 — forked from melgor/sompy_1.ipynb
SOMPY Tutorial 1 Refactored
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vivekseth
vivekseth / get_title_and_url.applescript
Created April 16, 2016 20:39 — forked from vitorgalvao/Get Title and URL.applescript
Applescript to get frontmost tab’s url and title of various browsers.
# Keep in mind that when asking for a `return` after another, only the first one will be output.
# This example is meant as a simple starting point, to show how to get the information in the simplest available way.
# Google Chrome
tell application "Google Chrome" to return URL of active tab of front window
tell application "Google Chrome" to return title of active tab of front window
# Google Chrome Canary
tell application "Google Chrome Canary" to return URL of active tab of front window
tell application "Google Chrome Canary" to return title of active tab of front window
# Chromium
@vivekseth
vivekseth / github-oauth.py
Created December 25, 2015 20:25 — forked from anonymous/github-oauth.py
This python script outputs an OAuth Authorization token for use with Github's API. Username and password are inputted via STDIN, and the authorization token is outputted on STDOUT.
import requests
import base64
import json
import random
import string
username = raw_input()
password = raw_input()
fingerprint = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))