Skip to content

Instantly share code, notes, and snippets.

@jayphelps
jayphelps / package.json
Last active May 11, 2024 00:29
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@djanatyn
djanatyn / leetcode-scrape.md
Created October 8, 2022 14:45
scraping leetcode problem description graphql api

I've been doing leetcode, so I wrote some Rust to make fetching the problem description a bit easier, using their GraphQL after capturing some requests as curl commands:

original working curl command

❯ curl https://leetcode.com/problems/contains-duplicate -vL -o/dev/null 2>&1 \
  | rg 'set-cookie: csrftoken=([^ ]+);' -or '$1'
AdasXUlUAP5wuVhq9qcTs6LYBZsk4IxKzdThaqsHcQIUR8JnReF1f4jTSJ7k8MAL

❯ curl 'https://leetcode.com/graphql' -X POST \
@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active May 11, 2024 00:28
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 11, 2024 00:24
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@robinsmidsrod
robinsmidsrod / dhcpd.conf
Last active May 11, 2024 00:20
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN (private network)
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
@robinsmidsrod
robinsmidsrod / _README.md
Last active May 11, 2024 00:20
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)

Go into your git checkout folder of ipxe.

Save the below file as nic-menu.ipxe.

Build iPXE like this:

cd src && make EMBED=../nic-menu.ipxe && cd ..

Requirements: current iPXE as of 2013-08-01 (for proper behavior of autoboot with a network device specified, netX feature, PCI vendor/device ID display and inc command)

@alinastorm
alinastorm / Untitled-2
Created January 27, 2019 19:25
ПРАВИЛА ОФОРМЛЕНИЯ ФАЙЛА README.MD НА GITHUB
**ПРАВИЛА ОФОРМЛЕНИЯ ФАЙЛА README.MD НА GITHUB*
<GITHUB></GITHUB>
Если вы начали работу на GitHub, решили загрузить туда свой проект для совместной работы с единомышленниками, то, скорее всего, в первую очередь перед вами встанет проблема создания первого файла – файла «readme.md».
Можно, конечно, просто выложить простой, неформатированный текстовой файл. Но вам захочется сделать его удобочитаемым, чтобы ссылки были выделены, блоки кода, присутствовали таблицы и так далее…
Эта статья поможет вам в этом.
Для форматирования текста на GitHub используются достаточно простые правила. Я перечислю основные и достаточные, так как не претендую на полноту официального руководства.
Текст можно обработать в любом простом текстовом редакторе, например в Notepad++, которым пользуюсь сам. А можно и прямо на GitHub редактировать файл в он-лайн режиме.
@notlin4
notlin4 / without-auth_e-book_tutorial_免登入電子書教學.md
Last active May 11, 2024 00:13 — forked from aliyaliu368/without-auth_e-book_tutorial_免登入電子書教學.md
教學用電子書與相關工具免登入教學 | 本指令碼用於繞過臺灣電子書與教學工具的前端身分驗證,達成不需要教師帳號即可使用。支援 翰林、南一、康軒、何嘉仁 四大出版社 | 請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請自行承擔所有後果與風險

教學用電子書與相關工具免登入教學

使用本指令碼即代表你同意本免責聲明

免責聲明

請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請「自行承擔」所有後果與風險。

簡介

本指令碼用於繞過臺灣電子書與教學工具的前端驗證,達成不需要教師帳號即可使用。

@richardgaywood
richardgaywood / vnv_on_steam_deck.md
Last active May 11, 2024 00:12
An incomplete guide to installing Fallout: Viva New Vegas on the Steam Deck

Intro & Disclaimers

I am not an expert, I am just Some Guy who happened to (a) get Viva New Vegas working on Steam Deck and (b) kept notes. These are those notes. I love Fallout and I love the Steam Deck and I want other people to experience those things, but I am also unable to promise to support you through every question you may have.

This is not a guide in the way that Viva New Vegas is a guide. VNV is incredibly well written and has your back every step of the way. These are just scribbles. Please set your expectations! Also, please tell me what doesn't work or is confusing! I would like us to work together to improve this process for others.

Who did this

This doc was written by docg/penllawen. Come say hi on the Viva New Vegas Discord or [this reddit thread]https://www.reddit.com/r/SteamDeck/comments/1c8uihm/an_incomplete_guide_to_installing_modded_fallout/).