This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; batch watermarking tool written in script-fu for the gimp | |
; Copyright 2010 Brian Taylor | |
; [email protected] | |
; | |
; Redistribute under the terms of the GNU General Public License version 2 or better | |
(define (add-text org-img new-layer msg-x msg-y the-text the-size the-font) | |
(let* ((floating-layer (car (gimp-text-fontname org-img new-layer msg-x msg-y the-text 1 TRUE the-size 0 the-font)))) | |
(gimp-floating-sel-anchor floating-layer))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Atom* lithp2_apply(Cons* env, Atom* list) | |
{ | |
DEBUG1("lithp2_apply: %s", list); | |
// sanity check | |
if(!list || !ISCONS(list)) { | |
ERROR1("cannot apply a non cons: %s", list); | |
return NIL; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; borrowed from ibdknox/jayq | |
(defn map->js [m] | |
(let [out (js-obj)] | |
(doseq [[k v] m] | |
(aset out (name k) v)) | |
out)) | |
(defn clj->js | |
"Recursively transforms ClojureScript maps into Javascript objects, | |
other ClojureScript colls into JavaScript arrays, and ClojureScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; borrowed from ibdknox/jayq | |
(defn map->js [m] | |
(let [out (js-obj)] | |
(doseq [[k v] m] | |
(aset out (name k) v)) | |
out)) | |
(defn clj->js | |
"Recursively transforms ClojureScript maps into Javascript objects, | |
other ClojureScript colls into JavaScript arrays, and ClojureScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deffun counter_inc(self) | |
self.x = +(self.x, 1) | |
in | |
deffun counter_dec(self) | |
self.x = -(self.x, 1) | |
in | |
deffun make_counter(start) | |
{ inc: counter_inc, dec: counter_dec, x: start } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deffun vector(x, y, z) { x: x, y: y, z: z } in | |
deffun sub(v1, v2) | |
vector( -(v1.x, v2.x), -(v1.y, v2.y), -(v1.z, v2.z)) | |
in | |
deffun abs(x) | |
if <(x, 0) then -(0, x) else x | |
in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
class A { | |
public: | |
virtual void doThing() { | |
printf("I'm an A\n"); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm an A | |
I'm an imposter! | |
I'm super imposing! | |
I'm also an A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
import os | |
import sys | |
import urllib | |
import pickle | |
import re | |
import csv | |
from bs4 import BeautifulSoup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) | |
#include <LedControl.h> | |
#define JOYX A5 | |
#define JOYY A8 | |
#define BUTTON 1 | |
#define LIGHT A9 | |
LedControl lc = LedControl(10,11,12,1); |
OlderNewer