Skip to content

Instantly share code, notes, and snippets.

View vitorio's full-sized avatar

Vitorio Miliano vitorio

View GitHub Profile
@vitorio
vitorio / distance-epub-01.py
Last active August 29, 2015 14:03
Turn a Distance ePub file into something more web-appropriate: replace the XHTML doctype with HTML5; inline zeitgeist.css, template.css, and some CSS from your.distance.cc to move the paragraph numbers; add IDs; protect the email address with JS; and resolve and embiggen the dsn.tc short URLs. Deeded to the public domain. To the extent possible …
# coding=utf-8
__author__ = 'vitorio'
import bs4
import argparse
import re
import requests
parser = argparse.ArgumentParser(description='Turn a Distance ePub file into something more web-appropriate')
parser.add_argument('epubfile', help='The Distance ePub file to read from')
@vitorio
vitorio / gist:7702384
Last active December 29, 2015 17:09
Using the makefile debugger remake to figure out a JSMESS/MESS build conflict
remake[1]: *** [obj/sdl/mess/mess.o] Error 1
#0 obj/sdl/mess/mess.o at ??
#1 messtiny at /home/milianov/remess/jsmess/mess/makefile:869
#2 emulator at /home/milianov/remess/jsmess/mess/makefile:812
#3 default at /home/milianov/remess/jsmess/mess/makefile:764
***Entering debugger because we encountered a fatal error.
***Exiting the debugger will exit make with exit code 1.
4:55 AM <Lindrian> guys
4:55 AM <Lindrian> anyone, please?
4:55 AM <Lindrian> Ive been asking for help for days >.<
5:19 AM <Lindrian> clb: do you have any idea??
5:20 AM <clb> Lindrian: sorry, no
5:20 AM <Lindrian> clb: if you happen to catch someone who does, could you ask them for me?
5:21 AM <Lindrian> you probably know more people using emscripten than i do
5:22 AM <clb> Lindrian: I've seen you asking for help for weeks now, I think you need to have the capability to research the problem field yourself and learn the required knowledge if there is nobody else that is familiar with the issue
5:23 AM <Lindrian> i have been searching extensively
5:23 AM <Lindrian> i have asked countless people
@vitorio
vitorio / gist:7368467
Created November 8, 2013 09:18
JSMESS audio notes
9:00 PM <•SketchCow> #define SDL_XFER_SAMPLES (512)
9:01 PM <•Vito`> right
9:02 PM <•Vito`> and now set that library_sdl.js line to allow 512
9:03 PM ⇐ BlueMaxim quit ([email protected]) Ping timeout: 265 seconds
9:03 PM <•SketchCow> if (SDL.audio.samples < 512 || SDL.audio.samples > 524288 /* arbitrary cap */) {
9:03 PM <•SketchCow> So, just as trivia
9:04 PM <•SketchCow> I do see some 1024 settings in that file
9:04 PM <•SketchCow> So this might break shit
9:04 PM <•SketchCow> But I agree, set to 512
9:04 PM <•SketchCow> Make 1024 if needed
Zhook: Zip + HTML + Book.
DRAFT SPECIFICATION
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119.
Software that displays a Zhook file is here called a Reading System (RS).