Skip to content

Instantly share code, notes, and snippets.

View ftrain's full-sized avatar

Paul Ford ftrain

View GitHub Profile
@ftrain
ftrain / n3tosql.pl
Last active April 30, 2021 16:54
Convert n3 triples to SQL in SQLite3, your own Very Shitty Triplestore.
#!/usr/bin/perl
while (<>) {
s/'/''/g;
/^([^\s]+)\s*([^\s]+)\s*(.+)\s+\.\s*$/;
my $s = $1;
my $p = $2;
my $o = $3;
$s=~s/[<>]//g;
$p=~s/[<>]//g;
@ftrain
ftrain / .emacs
Last active July 16, 2021 17:26
a nice .emacs for when you are on a terminal. Respects scroll wheel events. Very useful when run inside of tmux and combined with this tmuxconf: https://gist.github.com/ftrain/8443744
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; enable visual feedback on selections
(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
@ftrain
ftrain / rhymes.clj
Last active July 14, 2023 22:20
Annotated rhyming dictionary
;; This is at: https://gist.github.com/8655399
;; So we want a rhyming dictionary in Clojure. Jack Rusher put up
;; this code here:
;;
;; https://gist.github.com/jackrusher/8640437
;;
;; I'm going to study this code and learn as I go.
;;
;; First I put it in a namespace.
@ftrain
ftrain / actually.js
Last active November 10, 2023 01:16
A program that generates actuallies
/*
actually.js
_ _ _
__ _ __ _ __ _ __ _ ___| |_ _ _ __ _| | |_ _
/ _` |/ _` |/ _` |/ _` |/ __| __| | | |/ _` | | | | | |
| (_| | (_| | (_| | (_| | (__| |_| |_| | (_| | | | |_| |_
\__,_|\__,_|\__,_|\__,_|\___|\__|\__,_|\__,_|_|_|\__, ( )
|___/|/
*/