Skip to content

Instantly share code, notes, and snippets.

View jcahill's full-sized avatar

Jeremy Cahill jcahill

View GitHub Profile
@jcahill
jcahill / Sci-Hub and Libgen Bookmarklets.md
Last active April 17, 2024 01:13
Sci-Hub and Libgen bookmarklets

Sci-Hub and Libgen Bookmarklets

Usage

  1. Add a bookmark in your browser toolbar
  2. Name: something memorable
  3. URL: paste the code snippet
  4. On a paper's publisher page, or another page with the content's DOI, click on the bookmarklet.

If a DOI is found, your window will be sent to the corresponding sci-hub or libgen result page, respectively.
If no DOI is found, you won't go anywhere. An alert will tell you of the failure.

@jcahill
jcahill / List of Facebook Questions
Created December 14, 2017 04:44
Updated 2017-12
⏳ If I could live for a week in the past or the future, I’d rather…
⏳ If I could travel in time to any place and year, I would go to…
☀️ Between the morning and the night, I prefer…
☔️ The best thing to do when the weather is bad…
☕ My favorite beverage is…
☕️ Between coffee and dessert, it would be harder for me to give up…
☺️ Emojis that best describe me are…
☺️ Something that always makes me smile is…
⚽️ If I could spend the day with any athlete, I would spend it with…
⚽️ The football team I’m most loyal to is…
@jcahill
jcahill / get torrent size
Created December 14, 2017 04:34
parse data size from torrent file in bytes
head -1 example.torrent | grep -aoE '6:lengthi[0-9]+' | cut -di -f2 | awk '{s+=$1} END {print s}'
@jcahill
jcahill / Arxiv.md
Last active December 6, 2017 20:08
Open Science Taxonomies
Discipline Code Sub
Computer Science cs.AI Artificial Intelligence
Computer Science cs.CL Computation and Language
Computer Science cs.CC Computational Complexity
Computer Science cs.CE Computational Engineering, Finance, and Science
Computer Science cs.CG Computational Geometry
Computer Science cs.GT Computer Science and Game Theory
Computer Science cs.CV Computer Vision and Pattern Recognition
Computer Science cs.CY Computers and Society
@jcahill
jcahill / Memetic Media Collections.md
Created November 10, 2017 22:35
Memetic Media Collections
facebook-userID.zip⁽¹⁾
├─ html
│  ├─ ads.htm
│  ├─ contact_info.htm
│  ├─ events.htm
│  ├─ friends.htm
│  ├─ marketplace.htm
│  ├─ messages.htm
│ ├─ mobile_devices.htm
@jcahill
jcahill / gitfiti-painter.markdown
Created October 26, 2017 01:22
Gitfiti Painter
Node Title URL
1 Trump Goes Rogue - The New York Times https://www.nytimes.com/2017/07/31/opinion/donald-trump-reince-priebus-firing.html
1 The Final Humiliation of Reince Priebus - The Atlantic https://www.theatlantic.com/politics/archive/2017/07/the-final-humiliation-of-reince-priebus/535368/
1 “Trump goes rogue” | Power Line http://www.powerlineblog.com/archives/2017/07/trump-goes-rogue.php
1 No More Mister Nice Blog: ESTABLISHMENT REPUBLICANS: WHO IS THIS TRUMP PERSON OF WHOM YOU SPEAK? https://nomoremister.blogspot.com/2017/07/establishment-republicans-who-is-this.html
1 Without Priebus, Trump Is a Man Without a Party - POLITICO Magazine http://www.politico.com/magazine/story/2017/07/30/trump-priebus-unbound-215440
2 Sage Advice From the ‘Gold Standard’ of White House Chiefs of Staff - The New York Times https://www.nytimes.com/2017/07/30/us/politics/john-kelly-james-baker-white-house.html
2 Reminder: Trump's New Chief of Staff Told the President to Use a Big Sword on the Media
@jcahill
jcahill / backoff.py
Created April 2, 2017 02:11
Chat Bridge Backoff
import random
import time
class ExponentialBackoff:
"""An implementation of the exponential backoff algorithm
Provides a convenient interface to implement an exponential backoff
for reconnecting or retrying transmissions in a distributed network.
#! /usr/bin/env python
import base64
print base64.b64decode("CiAgICAgICAgICAgICAgICAgICAgICAgJ0BAQEBAIzogICAgICAgK0BAQEBAQCAsQEBAQEBAQEBAQEBAIzogICAgICAgICAgICAgICAgICAgQEBAQEBAQEBAQEBAQCtgICAgICAgICAgYCtAQEBAQEBAIzogICAgIC5AQEBAQEBAQEBAJyAgICAgICAgICA6K0BAQEBAQEArLiAgICAgI0BAQEBAQEBAQEBAQEBAQEBAQAogICAgICAgICAgICAgICAgICAgICAgICdAQEBAQEBAQCAgICAsQEBAQEBAQEAgLEBAQEBAQEBAQEBAQEBAQGAgICAgICAgICAgICAgICAgIEBAQEBAQEBAQEBAQEBAQEAgICAgICAgQEBAQEBAQEBAQEBAQCwgICAsQEBAQEBAQEBAQEBAJyAgICAgIC5AQEBAQEBAQEBAQEBAICAgIEBAQEBAQEBAQEBAQEBAQEBAQEAKICAgICAgICAgICAgICAgICAgICAgICAnQEBAQEBAQEAsICAgQEBAQEBAQEBAICxAQEBAQEBAQEBAQEBAQEBALiAgICAgICAgICAgICAgICBAQEBAQEBAQEBAQEBAQEBAQCAgICAgQEBAQEBAQEBAQEBAQEBALCAgLEBAQEBAQEBAQEBAQEAjICAgIGBAQEBAQEBAQEBAQEBAQEAgICBAQEBAQEBAQEBAQEBAQEBAQEBACiAgICAgICAgICAgICAgICAgICAgICAgJ0BAQCwnQEBAQCAgK0BAQCs6O0BAQCBgLCwsLCwsLCwsLDo6I0BAQEBgICAgICAgICAgICAgICAgLCwsLCwsLCwsLCwsJ0BAQEBAICAgK0BAQEAnLCwsLCwnI0BAQEAgIGAsLCwsLCwsLCwnQEBAQDsgICBAQEBAQCcsLCwsLCdAQEBAIyAgLCwsLCwsLCw6LCwsLCwsLCwsLAogICAgICAgIC