This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = []; | |
var letters = "abcdefghijklmnopqrstuvwxyz".split(''); | |
letters.forEach(function(letter) { | |
function f() { | |
var out = _.join(''); | |
_.length = 0; | |
return out; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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, ...rest) => | |
!first ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Uber EATS statistics | |
1. Go to https://www.ubereats.com, 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 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Try this file with both TypeScript [1] and Flow [2]. | |
1. https://www.typescriptlang.org/play/index.html | |
2. https://flow.org/try/ | |
TypeScript playground also provides a way to run the code - | |
check where the code is crashing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Run parallel</title> | |
</head> | |
<body> | |
<script> | |
(async function() { | |
async function f1() { | |
return new Promise(res => { | |
setTimeout(() => { |
- Open
Automator.app
, click "New Document", select "Application" type. - Create the same workflow as on the screenshot, make sure to use the right URL to your Roam graph.
- Save it (⌘S) as
Roam.app
. - Find the newly created
Roam.app
in yourApplications
folder, right click, then "Get Info". - Download and drag
roam.icns
on the icon in the info window. - Drag
Roam.app
fromApplications
to your dock.
Open https://www.youtube.com/feed/channels, open JS console.
console.log(
Array.from(document.querySelectorAll("ytd-channel-renderer"))
.map((item) => ({
title: item.querySelector("#text-container").textContent.trim(),
url: item.querySelector("#main-link").href,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Writing a Mark-Sweep Garbage Collector in C++. | |
* | |
* This is a source code for the Lecture 9 from the | |
* Essentials of Garbage Collectors course: | |
* | |
* http://dmitrysoshnikov.com/courses/essentials-of-garbage-collectors/ | |
* | |
* See full details in: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyPDF2.generic import ( | |
DictionaryObject, | |
NumberObject, | |
FloatObject, | |
NameObject, | |
TextStringObject, | |
ArrayObject | |
) | |
# x1, y1 starts in bottom left corner |
OlderNewer