Skip to content

Instantly share code, notes, and snippets.

Because we're meeting in different places, it's hard sometimes to satisfy the rider of all the speakers. When bands are making performance, they have a list of things concert organizers should have in order for concert to be successfull and on a good level.

Don't get surprised that it's easier to hook up MacBook with MDP than your Lenovo laptop. It just is.

Neither one of mentioned points is criticizing or trying to fix an ability to speak in public. Instead, all the points are purely technical. No matter how well you can speak, slides that people can't see, inability to use your laptop, or an outage during live-coding session may ruin your talk.

After seeing common patterns, we've decided to make that one:

Checklist for speakers

@ifesdjeen
ifesdjeen / AppDelegate.h
Last active December 16, 2015 06:29
How secure is your operating system? On Mac Os X all your keystrokes can be logged with a utility written by Objective C first-timer without any concerns.
#import <Cocoa/Cocoa.h>
static id monitorKeyDown;
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@end
@ifesdjeen
ifesdjeen / fn.clj
Last active December 16, 2015 21:09
Always think of Clojure functions, when you pass them around, as of values, not references. Whenever you change the root, previous function (one that you have already passed around), won't change. Only future calls will yield new value.
;; Declare a function
(defn fun1 [] (println 1))
;; And a hash that would capture that function
(def h {:key fun1})
;; => {:key #<user$fun1 user$fun1@5e540696>}
;; Now, check out the value of the key
(:key h)
;; => #<user$fun1 user$fun1@5e540696>
@ifesdjeen
ifesdjeen / pprint.clj
Created May 1, 2013 20:00
Pretty-print object methods
(require '[clojure.reflect :as r])
(use '[clojure.pprint :only [print-table]])
(print-table (:members (r/reflect"foo")))
@ifesdjeen
ifesdjeen / with_tmp_file.clj
Created May 1, 2013 20:14
Do something within temporary directory
(defmacro with-temp-file
[f-sym & body]
`(let [prefix# (.toString (UUID/randomUUID))
postfix# (.toString (UUID/randomUUID))
~f-sym (java.io.File/createTempFile prefix# postfix#)]
(try
(do ~@body)
(finally
(.delete ~f-sym)))))
@ifesdjeen
ifesdjeen / multimethods.clj
Created May 1, 2013 20:16
Clojure Multimethods
(defmulti even-odd
(fn [i]
(if (= 0 (mod i 2))
:even
:odd)))
(defmethod even-odd :even
[i]
(println "Even " i))
@ifesdjeen
ifesdjeen / apply_to_values.clj
Created May 1, 2013 20:16
Apply to values (into hash)
(defn- apply-to-values [m f]
"Applies function f to all values in map m"
(into {} (for [[k v] m]
[k (f v)])))
@ifesdjeen
ifesdjeen / ring_middleware_order.clj
Created May 1, 2013 20:23
Ring middleware execution order
(defn handler
[]
(println "HANDLER"))
(defn wrap-1
[handler]
(fn [request]
(println 1)
(handler request)
@ifesdjeen
ifesdjeen / keystrokes_dotplot.r
Created May 1, 2013 20:27
Render dot-plot of Keystrokes by minute
setwd("~/analytics/")
kp = read.csv("grouped_keys_combined")
colnames(kp) = c("Day", "Minute", "Strokes")
attach(kp)
parseTimestamp <- function(ts) as.POSIXct((ts + 120*60*1000) / 1000, origin="1970-01-01", tz="CEST")
kp$DayParsed <- parseTimestamp(kp$Day)
head(kp$DayParsed)
library("ggplot2")
@ifesdjeen
ifesdjeen / new_gist_file
Created May 9, 2013 11:27
Non-confusing contains? function for vectors
(defn vec-contains?
[vec value]
(not (nil? (some #(= value %) vec))))
(vec-contains? ["a" "b" "c"] "a") ;; true
(vec-contains? ["a" "b" "c"] "e") ;; false