Skip to content

Instantly share code, notes, and snippets.

View doersino's full-sized avatar
🐛
Squashing bugs but sparing the cute ones!

Noah Doersing doersino

🐛
Squashing bugs but sparing the cute ones!
View GitHub Profile
@doersino
doersino / aerialbot-lite-scriptable.js
Last active August 22, 2021 17:36
A Scriptable widget that displays a random map tile from Google Maps – basically a lite variant of https://github.com/doersino/aerialbot for your homescreen.
// Hello! I've move the code to a proper GitHub repository:
// https://github.com/doersino/scriptable-widgets/tree/main/aerialbot-lite
@doersino
doersino / uji.md.html
Created May 22, 2021 08:46
Markdeep source code of UJI's logo, see https://github.com/doersino/uji
*********
*| |||*
*| |||*
* '-' ||*
*----' |*
*********
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
@doersino
doersino / repeatedly-apply-most-recent-filter-and-save-iterations-as-png.jsx
Last active May 5, 2021 08:32
A Photoshop script that will repeatedly (re)apply the most recently used filter to the current document and save each iteration as a PNG image.
// A Photoshop script that will repeatedly (re)apply the most recently used
// filter to the current document and save each iteration as a PNG image.
//
// Usage:
// 1. Create an empty image, do some stuff to it, save it as a PSD somewhere
// (this is also where the results will end up).
// 2. Make sure there's only one layer. I think if there's more than one, the
// filter will be repeatedly applied to the selected layer only, and the rest
// should work as expected, but I didn't bother testing it.
// 3. Apply your desired filter with the desired settings (say, "Wave" with low
// Generative art with Markdeep diagrams.
//
// Examples: https://twitter.com/doersino/status/1321191553403129857
// Markdeep: https://casual-effects.com/markdeep/features.md.html#basicformatting/diagrams
//
// Usage:
// 1. Navigate to: https://doersino.github.io/markdeep-diagram-drafting-board/
// 2. Open the JavaScript console (if you need help, see https://webmasters.stackexchange.com/a/77337).
// 3. Paste the contents of this file and press Enter.
// 4. Type "art()" and press Enter.
@doersino
doersino / markdeep-preview.html
Last active September 30, 2024 12:14
Preview Markdeep as you're typing (very simple, unstyled proof of concept)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
#markdeep_input {
height: 600px;
font-family: monospace;
}
td {
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
char *inttostr_conventional(int n) {
char *s = (char*) malloc(sizeof(char) * 42);
sprintf(s, "%d", n);
return s;
}
@doersino
doersino / read_computeerts.php
Last active September 21, 2016 12:55
Upgrade script from ReAD commit f5bd3f4 to ad87e7b. See https://github.com/doersino/ReAD.
<?php
error_reporting(E_ALL);
require_once "deps/meekrodb.2.3.class.php";
require_once "TextExtractor.class.php";
$allArticles = DB::query("SELECT * FROM `read` ORDER BY `time_added` ASC");
$N = count($allArticles);
% 1. download files from http://alumni.soe.ucsc.edu/%7Exzhu/doc/turbulence.html to current folder
%
% 2. run
% $ youtube-dl -o sx.mp4 https://www.youtube.com/watch?v=_BgJEXQkjNQ
% to download the video and
% $ ffmpeg -ss 00:00:50 -i sx.mp4 -filter:v fps=fps=60/1 frames/ffmpeg_%3d.png
% to extract the frames - quit this once it reaches frame 1310 or so
%
% 3. then run this script (might take a few days)
%
% 1. download files from http://alumni.soe.ucsc.edu/%7Exzhu/doc/turbulence.html to current folder
% and http://tmp.hejnoah.com/frames_Sothh.zip to subfolder "frames_Sothh"
%
% 2. run
% $ youtube-dl -o sx.mp4 https://www.youtube.com/watch?v=_BgJEXQkjNQ
% to download the video and
% $ ffmpeg -ss 00:01:05 -i sx.mp4 -filter:v fps=fps=60/1 frames/ffmpeg_%3d.png
% to extract the frames - quit this once it reaches frame 450 or so
%
% 3. then run this script
@doersino
doersino / read-get-titles.php
Last active September 8, 2016 19:45
Will attempt to (re-)get titles and sources for all articles in ReAD where the title is empty.
<?php
// Put this in the same folder as your https://github.com/doersino/ReAD install.
// This will attempt to (re-)get titles and sources for all articles where the
// title is empty.
require_once "lib/meekrodb.2.3.class.php";
require_once "Helper.class.php";
$q = DB::query("SELECT * FROM `read` WHERE `title` = ''");