Skip to content

Instantly share code, notes, and snippets.

@fabienhinault
fabienhinault / mixed-rad.rkt
Created May 26, 2015 19:57
mixed radix n-tuple generation
(define (1+ radixes a)
(if (equal? (car a) (- (car radixes) 1))
(cons 0 (1+ (cdr radixes) (cdr a)))
(cons (+ 1 (car a)) (cdr a))))
(define (gen radixes a)
(displayln a)
(gen radixes (1+ radixes a)))
<!DOCTYPE html>
<html>
<head></head>
<body><div style="display:inline-block; border-style: solid; border-width: 1px"><p >SCRIPT</p>
<div style="display:inline-block; border-style: solid; border-width: 1px"><p >VAR</p>
<div style="display:inline-block; border-style: solid; border-width: 1px"><p >VAR</p>
<div style="display:inline-block; border-style: solid; border-width: 1px"><p >NAME</p> instance
</div>
<div style="display:inline-block; border-style: solid; border-width: 1px"><p >NEW</p>
<div style="display:inline-block; border-style: solid; border-width: 1px"><p >NAME</p> JavaAdapter
@fabienhinault
fabienhinault / A.mp3
Last active August 29, 2015 14:24
alphabet.html
@fabienhinault
fabienhinault / combinations.rkt
Created September 13, 2015 05:26
combinations
#lang racket
(define (combinations xs n)
(cond ((equal? n 0)
'(()))
((equal? n (length xs))
(list xs))
(else
(append (map (lambda (ys) (cons (car xs) ys))
(combinations (cdr xs) (- n 1)))
@fabienhinault
fabienhinault / link_all_txts.sh
Created November 4, 2015 22:28
create symbolic links to lots of files
@fabienhinault
fabienhinault / unefois.lob
Last active September 7, 2016 11:45
macro pour générer les fiches d'inscriptions personnalisées "dites-le nous une seule fois".
REM ***** BASIC *****
Sub Main
Dim Doc As Object
Dim Url As String
Dim Dummy() 'It is an (empty) array of PropertyValues
Dim oDocProps as object
Dim oProps as object
Dim iRow as Integer
@fabienhinault
fabienhinault / croppdf.bash
Last active September 13, 2016 19:28
Attempts to crop a pdf file in order to simulate a scale
gs -o cropped.pdf -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=595.32
gs -o cropped.pdf -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=595.32 -dDEVICEHEIGHTPOINTS=421 -dFIXEDMEDIA -c " 0 0 595.32 421 rectclip" -f final.pdf
gs -o cropped2.pdf -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=595.32 -dDEVICEHEIGHTPOINTS=421 -dFIXEDMEDIA -c " 0 421 translate" -c " 0 0 595.32 421 rectclip" -f final.pdf
gs -o cropped2.pdf -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=595.32 -dDEVICEHEIGHTPOINTS=421 -dFIXEDMEDIA -c " 0 421 595.32 842 rectclip" -f final.pdf
gs -o cropped2.pdf -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=595.32 -dDEVICEHEIGHTPOINTS=421 -dFIXEDMEDIA -c " 0 421 translate" -c " 0 421 595.32 842 rectclip" -f final.pdf
gs -o cropped2.pdf -sDEVICE=pdfwrite -c " 0 421 translate" -c " 0 421 595.32 842 rectclip" -f final.pdf
gs -o cropped2.pdf -sDEVICE=pdfwrite -c " 0 421 translate" -c " 0 0 595.32 421 rectclip" -f final.pdf
gs -o cropped2.pdf -sDEVICE=pdfwrite -c " 0 0 595.32 421 rectclip" -f final.pdf
gs -o cropped2.pdf -sDEVICE=pdfwrite -c
/drawQrPath
{
newpath
%...qr path from http://goqr.me/
31 32 moveto
32 32 lineto
32 33 lineto
31 33 lineto
31 32 lineto
32 32 moveto
ch6 0Z
Q: When do you get multiline error messages?
R: When the error is detected while TEX is processing some higher-level commands.
$('tr.pdct').each(function(){console.log($(this)[0].attributes['data-ref'].value);});