Skip to content

Instantly share code, notes, and snippets.


Artem Tyurin agentcooper

View GitHub Profile
agentcooper /
Last active Jan 28, 2022
Save YouTube subscriptions

Open, open JS console.

Save as Markdown list

    .map((item) => ({
      title: item.querySelector("#text-container").textContent.trim(),
 url: item.querySelector("#main-link").href,
agentcooper /
Last active Sep 26, 2020
Create Roam Research dock icon in macOS
  1. Open, click "New Document", select "Application" type.
  2. Create the same workflow as on the screenshot, make sure to use the right URL to your Roam graph.
  3. Save it (⌘S) as
  4. Find the newly created in your Applications folder, right click, then "Get Info".
  5. Download and drag roam.icns on the icon in the info window.
  6. Drag from Applications to your dock.
View run-parallel.html
<title>Run parallel</title>
(async function() {
async function f1() {
return new Promise(res => {
setTimeout(() => {
agentcooper / subtyping.js
Last active Mar 22, 2018
Record and function subtyping examples for TypeScript and Flow
View subtyping.js
Try this file with both TypeScript [1] and Flow [2].
TypeScript playground also provides a way to run the code -
check where the code is crashing.
agentcooper /
Last active Mar 10, 2018
Sort YouTube playlist/channel by view count or average rating
agentcooper /
Last active Apr 26, 2022
Telegram chat backup/export

How to use

  1. Login to
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.


agentcooper / uber-eats.js
Created Aug 5, 2017
Uber EATS statistics
View uber-eats.js
Uber EATS statistics
1. Go to, click **Sign in**
2. Enter your credentials, sign in
3. Open JavaScript console (CMD + Option + J)
4. Copy following code and paste it into the console, hit enter
from PyPDF2.generic import (
# x1, y1 starts in bottom left corner
View index.js
// node --harmony index.js
var cons = (a, b) => (f) => f(a, b);
var car = (p) => p((p, q) => p);
var cdr = (p) => p((p, q) => q);
var list = (first, =>
!first ?
View crazy.js
var _ = [];
var letters = "abcdefghijklmnopqrstuvwxyz".split('');
letters.forEach(function(letter) {
function f() {
var out = _.join('');
_.length = 0;
return out;