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 / backup_tumblr.sh
Last active January 15, 2022 23:32
Simple way of backing up one or multiple Tumblr blogs to date-prefixed folders; downloads and removes required software (except Python) automatically. http://neondust.tumblr.com/post/97723922505/simple-tumblr-backup-script-for-mac-os-x-and-linux
#!/bin/bash
# http://neondust.tumblr.com/post/97723922505/simple-tumblr-backup-script-for-mac-os-x-and-linux
# https://gist.github.com/doersino/7e3e5db591e42bf543e1
# BLOGS is a space-separated list of the blogs you want to backup. You can omit
# the ".tumblr.com" part if you want.
BLOGS="neondust.tumblr.com aufgeloest.tumblr.com hejlisten.tumblr.com"
# OUT is the directory where the backups will be stored. For each blog, a date-
# prefixed subdirectory will be created here.
// 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 / 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
#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 / markdeep-preview.html
Last active November 20, 2019 13:25
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 {
@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