Skip to content

Instantly share code, notes, and snippets.

View agentcooper's full-sized avatar

Artem Tyurin agentcooper

View GitHub Profile
* Writing a Mark-Sweep Garbage Collector in C++.
* This is a source code for the Lecture 9 from the
* Essentials of Garbage Collectors course:
* See full details in:
agentcooper /
Last active August 11, 2023 00:56
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 September 26, 2020 10:39
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.
<title>Run parallel</title>
(async function() {
async function f1() {
return new Promise(res => {
setTimeout(() => {
agentcooper / subtyping.js
Last active March 22, 2018 07:44
Record and function subtyping examples for TypeScript and Flow
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 March 10, 2018 13:49
Sort YouTube playlist/channel by view count or average rating
agentcooper /
Last active April 9, 2024 19:27
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 August 5, 2017 23:31
Uber EATS statistics
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
agentcooper / index.js
Last active November 17, 2015 10:48
// 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 ?