- thomas ligotti - i have a special plan for this world
- thomas ligotti - the spectral link
- eno what art does
- learn you a haskell
- Swans: Sacrifice and Transcendence
- László Krasznahorkai
- Broken Music
- https://odd-lots-books.netlify.app/
This file contains hidden or 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
| const puppeteer = require("puppeteer"); | |
| let browser; | |
| (async () => { | |
| browser = await puppeteer.launch(); | |
| const [page] = await browser.pages(); | |
| const ua = | |
| "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"; | |
| await page.setUserAgent(ua); | |
| const url = "https://www.example.com"; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| <script> | |
| const nav = `<a href="#/">Home</a> | | |
| <a href="#/about">About</a> | |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| </head> | |
| <body> | |
| <script type="module"> | |
| // reproduction of preact hooks + router failing with unpkg |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.development.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="app"></div> |
This file contains hidden or 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
| require 'json' | |
| require 'sequel' | |
| require 'sinatra/base' | |
| class SinatraApp < Sinatra::Base | |
| # https://stackoverflow.com/a/20726197/6243352 | |
| def initialize(app = nil, db) | |
| super(app) | |
| @db = db | |
| end |
This file contains hidden or 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
| # Be sure to include Ben N.'s await for IAsyncOperation: | |
| # https://superuser.com/questions/1341997/using-a-uwp-api-namespace-in-powershell | |
| Add-Type -AssemblyName System.Runtime.WindowsRuntime | |
| $asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0] | |
| Function Await($WinRtTask, $ResultType) { | |
| $asTask = $asTaskGeneric.MakeGenericMethod($ResultType) | |
| $netTask = $asTask.Invoke($null, @($WinRtTask)) | |
| $netTask.Wait(-1) | Out-Null |
This file contains hidden or 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
| import os | |
| from PIL import Image | |
| def main(): | |
| # TODO https://stackoverflow.com/questions/4228530/pil-thumbnail-is-rotating-my-image | |
| in_dir = "." | |
| out_dir = "thumbs" | |
| max_dimensions = 350, 350 | |
| extension = ".jpg" | |
| postfix = "_thumb.jpg" |