Skip to content

Instantly share code, notes, and snippets.

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 Jul 23, 2021
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.
View aerialbot-lite-scriptable.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-gray; icon-glyph: space-shuttle;
//
// ærialbot lite
// https://gist.github.com/doersino/bc66857d75f527cbe3a36328cd7580b3
// https://twitter.com/doersino/status/1418647087449784330
// - This is the code for a Scriptable widget, see https://scriptable.app.
// - It displays a random map tile (at a random zoom level and from a random CDN
// server) from Google Maps. Tapping on the widget will open Google Maps
@doersino
doersino / uji.md.html
Created May 22, 2021
Markdeep source code of UJI's logo, see https://github.com/doersino/uji
View uji.md.html
*********
*| |||*
*| |||*
* '-' ||*
*----' |*
*********
<!-- 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
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.
View repeatedly-apply-most-recent-filter-and-save-iterations-as-png.jsx
// 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
View generative-art-with-markdeep-diagrams.js
// 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 Nov 20, 2019
Preview Markdeep as you're typing (very simple, unstyled proof of concept)
View markdeep-preview.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
#markdeep_input {
height: 600px;
font-family: monospace;
}
td {
View inttostr.c
#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 Sep 21, 2016
Upgrade script from ReAD commit f5bd3f4 to ad87e7b. See https://github.com/doersino/ReAD.
View read_computeerts.php
<?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);
View sx2.m
% 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)
%
View sx.m
% 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 Sep 8, 2016
Will attempt to (re-)get titles and sources for all articles in ReAD where the title is empty.
View read-get-titles.php
<?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` = ''");