Skip to content

Instantly share code, notes, and snippets.

@steinuil
steinuil / helvetica-naming-scheme.md
Last active August 29, 2015 14:06
The Helvetica Scenario default naming scheme

This document defines how manga releases hosted on The Helvetica Scenario and the files inside them have to be named.

This is to avoid a cluserfuck of filenames, which only makes the user experience worse and makes finding files a mess.

Archives

The chapter archives (which should always be compressed in .zip as it's ubiquitous and open source) have to be named using this scheme:

Series Name v04c32x1 [Group Name]{r2}.zip

The elements mentioned in this example will be explained here:

require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = ""
config.consumer_secret = ""
config.access_token = ""
config.access_token_secret = ""
end
if ARGV[1].nil?
 . . . . . . . . . . . . . . . . . . 
 . . . . . . . . . . . . . . . . .. . . . . . . 
 . . . . . . . . . . . ..:X;S.. . . . . . 
 . . . . . . . . . . . .%X %8tt8.X.. . . . . .
 . . . . . . . . . . . . t@:;@SS%t8.8;X%@:. . . . . 
 . . . . . . . . . . ..% S8%StS8S8 ;tS8S%:;[0;37;5;47;107
#!/usr/bin/env rc
dir=$home/Desktop
cd /tmp
printf 'Cloning Textual... '
git clone -q 'https://github.com/Codeux-Software/Textual.git'
echo Done!
printf 'Cloning submodules... '
cd Textual
FILES= coreexamples.tex lablexamples.tex objectexamples.tex moduleexamples.tex\
advexamples.tex polymorphism.tex
TOPDIR=../../..
include $(TOPDIR)/Makefile.tools
LD_PATH="$(TOPDIR)/otherlibs/str:$(TOPDIR)/otherlibs/unix"
CAMLLATEX=$(SET_LD_PATH) $(OCAMLRUN) ../../tools/caml-tex2
TEXQUOTE=../../tools/texquote2
@steinuil
steinuil / option.ml
Created May 10, 2018 09:22
Option module
let get = function
| Some x -> x
| None -> raise Not_found
let with_default def = function
| Some x -> x
| None -> def
let map f = function
| Some x -> Some (f x)
if x1 then
1
else if x2 then
2
else if x3 then
3
if x1 then
1
type Nat = 0 | { succ: Nat };

type Succ<N extends Nat> = { succ: N };

type Prev<N extends Nat> =
  N extends Succ<infer M> ? M : N;

type Add<N extends Nat, M extends Nat> =
  N extends Succ<infer PrevN> ? { succ: Add<PrevN, M> } : M;
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[ ./hardware-configuration.nix
./thinkpad.nix
B = build
$B/%.o: %.cpp | $B
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
$B/%.debug.o: %.cpp $B
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
%.exe: %.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^