Skip to content

Instantly share code, notes, and snippets.

@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active May 30, 2024 19:09
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?

@lyaann
lyaann / readme.txt
Created July 14, 2021 18:04
"La Ira Del Arte" (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@bitonic
bitonic / reverse.hs
Last active March 22, 2021 12:20
Simple reverse AD
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -Wall #-}
import Data.IORef
@philipjewell
philipjewell / photobucket_bulk_download.md
Last active March 29, 2023 00:23
Download all your photobucket images in bulk via CLI

backstory

On Jul 4, 2017 theverge.com posted an article about photobucket (silently) no longer allowing their users to source their images on 3rd party websites for free, thus leaving websites all over the web broken displaying the following image in replace:

Me being one of those individual, I attempted to go into my photobucket account and download my content as I now have my own hosting I am able to store those images on; however, the only ways to bulk download (on desktop) is by downloading albums through their interface. Doing so, gave me the following error message: "Hmmm. Something didn't click. Want to give it another shot? Try again now."

Doing this serveral times, in different browsers (chrome, firefox and safari), after disabling all my addons and extensions (including ad blockers), it still didn't work.

At this point, doing anything on their website w

@desmondfernando
desmondfernando / DisableHWStats.cs
Last active December 3, 2021 08:46
Code snippet to disable HW statistics reporting. NOTE only works in the Editor not for runtime! Unity Pro only
var type = Type.GetType( "UnityEditor.PlayerSettings,UnityEditor" );
if ( type != null )
{
var propertyInfo = type.GetProperty( "submitAnalytics", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static );
if ( propertyInfo != null )
{
{
var value = (bool)propertyInfo.GetValue( null, null );
Debug.LogFormat( "PlayerSettings.submitAnalytics {0}", value );
}
@mxrnx
mxrnx / nasin.md
Last active November 24, 2020 01:25
lipu pi nasin pona lon toki pona

nasin pona

toki. ni li lipu pi nasin pona lon toki pona. toki Sonko la nimi ona li "Daodejing" (anu "Tao te ching", kepeken ilo pi sin ala).

tenpo ni la lipu ni li pini ala. sina li wile pona e ijo la o toki tawa mi lon ilo IRC.

1

nasin li jo e nimi la
ona li nasin ala pi tenpo ale
nimi pi ken nimi li
wile ante tan tenpo

// My game is using a Japanese font that doesn't seem to declare codepoint for Kanjis for those which only comprised of a simple radical.
// e.g. https://en.wikipedia.org/wiki/Radical_180
// Radical 180 (U+2FB3) ~~ 音 (U+97F3)
// I am remapping the codepoints in software but couldn't find an easy to parse list, ended up scraping from Unicode webpages
{ 0x4E00, 0x2F00 }, // Kangxi Radical One
{ 0x4E28, 0x2F01 }, // Kangxi Radical Line
{ 0x4E36, 0x2F02 }, // Kangxi Radical Dot
{ 0x4E3F, 0x2F03 }, // Kangxi Radical Slash
{ 0x4E59, 0x2F04 }, // Kangxi Radical Second
@ColtonPhillips
ColtonPhillips / pzr.py
Created November 19, 2015 23:55
This converts a png into puzzlescript object format. It works for sizes that aren't typical for the editor
def addUnique(l,item):
if item not in l:
l.append(item)
return l
from PIL import Image
import sys
im = Image.open(sys.argv[1])
pix = im.load()
@idStar
idStar / SpreadsheetExportToCSV.scpt
Last active March 8, 2020 03:57
Export spreadsheet to UTF8 CSV using Numbers 3.6 on a Mac with AppleScript
#! /usr/bin/osascript
(*
---------------------------------------------------------------------------------
Script: SpreadsheetExportToCSV
Command-line tool to convert a spreadsheet document to CSV
This AppleScript is tested with and compatible with Apple iWork Numbers 3.6,
current as at October 23, 2015.