Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block rwat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
joyrexus /
Last active Jan 25, 2020
Perl one-liners


perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):

noiges / tischkonzert.txt
Last active Apr 23, 2017
Attempt to write down the lyrics of the german song "Tischkonzert" by "Rakede":
View tischkonzert.txt
Meine Freundin ist weg (so wie Schecks aus Amerika).
Geilheit macht mich zum Teilzeit-Polemiker.
Freiheit bringt mich jetzt nicht weiter Mann,
ich frage mich: Was fang ich bloß mit so viel Freizeit an?
Ich hab Chips gekauft und fern gesehen,
VIPs beim Boxen und Kochen im Dschungel — und in den Wehen.
Ich weiß nur: Live ist als Scheiß einzustufen!
Mir wars egal — ich hab 300 mal da angerufen.
stuarthalloway / Datomic News Updates
Created Jun 18, 2012
Datomic update examples against a social news database
View Datomic News Updates
;; Datomic example code
;; demonstrates various update scenarios, using a news database
;; that contains stories, users, and upvotes
;; grab an in memory database
(use '[datomic.api :only (q db) :as d])
(def uri "datomic:mem://foo")
(d/create-database uri)
(def conn (d/connect uri))
stuarthalloway / gist:2645453
Created May 9, 2012
Datomic queries against Clojure collections
View gist:2645453
;; Datomic example code
(use '[datomic.api :only (db q) :as d])
;; ?answer binds a scalar
(q '[:find ?answer :in ?answer]
;; of course you can bind more than one of anything
(q '[:find ?last ?first :in ?last ?first]
"Doe" "John")
stuarthalloway / gist:2559635
Created Apr 30, 2012
Using data functions on both peer and transactor side
View gist:2559635
;; this code valid as of build 3084
;; in-memory example database
(use '[datomic.api :only (db q) :as d])
(def uri "datomic:mem://test")
(d/create-database uri)
(def conn (d/connect uri))
;; example schema
(d/transact conn [{:db.install/_attribute :db.part/db,
stuarthalloway / gist:2158138
Created Mar 22, 2012
Many to Many Datomic example
View gist:2158138
;; Datomic example code
;; make in memory database
(use '[datomic.api :only (q db) :as d])
(def uri "datomic:mem://matches")
(d/create-database uri)
(def conn (d/connect uri))
;; add the match attribute
ghoseb / ns-cheatsheet.clj
Last active Feb 18, 2020 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
View ns-cheatsheet.clj
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;; * :import refers Java classes to the current namespace.
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
You can’t perform that action at this time.