Skip to content

Instantly share code, notes, and snippets.

View paulkoegel's full-sized avatar

Paul Kögel paulkoegel

View GitHub Profile
;loaded from gist: https://gist.github.com/paulkoegel/cc14431f58bedfc1899ea33b1853144b
(ns instructions.core
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]))
(defn parent [& children]
[:div
[:h1 "Parent"]
children])
(ns instructions.core
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]))
(defn parent [& children]
[:div
[:h1 "Parent"]
children])
(defn info []
@paulkoegel
paulkoegel / garden-cheat-sheet.clj
Last active February 20, 2022 21:09
Garden (CSS in Clojure) Cheat Sheet
;; https://github.com/noprompt/garden
[:h1 {:color "green"}]
;; multiple selectors
[:h2 :h3 {:color "orange"}]
;; => h1, h2 { color: orange; }
;; descendants
[:h1 [:a {:text-decoration "none"}]]
@paulkoegel
paulkoegel / object-spread.js
Created September 5, 2016 14:07
object-spread.js
const young_jim = {age: 20, name: "Jim", last_name: "Beam", guns: "many"};
const married_jim = { age: 34, name: "Jim", last_name: "Parker", hair: false };
const joined_jim = {...young_jim, ...married_jim};
console.log(joined_jim); // => { "age": 34, "guns": "many", "hair": false, "last_name": "Parker", "name": "Jim" }
@paulkoegel
paulkoegel / clj-west-download.mdown
Last active April 17, 2016 11:30
Download all ClojureWest 2016 videos with youtube-dl
  • download youtube-dl
  • run:
    youtube-dl https://www.youtube.com/playlist\?list\=PLZdCLR02grLq4e8-1P2JNHBKUOLFTX3kb --playlist-items 1-5,7,9-11,13-26
  • the skipped items are deleted or duplicate videos
@paulkoegel
paulkoegel / 2012-03-28-smacss-and-sass-the-future-of-stylesheets.markdown
Last active August 29, 2015 14:10
SMACSS and SASS - The future of stylesheets (by @jhilden)
@paulkoegel
paulkoegel / instructions.markdown
Last active August 29, 2015 14:07
Print youtube videos as a flip book

Print Youtube Videos as a Flip Book

  1. open Firefox (sadly doesn't work in Chrome yet).
  2. opt in for Youtube's HTML5 video player here: https://www.youtube.com/html5
  3. open a Youtube video with thumbnail previews (e.g. https://www.youtube.com/watch?v=sd4bqmP_460)
  4. hover over the videos progress bar so that a thumbnail appears
  5. run the script below in your JavaScript console
  6. wait a second for it to finish - it first shows you all thumbnails in an unsliced grid, 1 second later you should see it sliced and with black borders
  7. cross your fingers it's in a 5x5 grid - that's what the code expects, otherwise tight click on a thumbnail, "view background image", count rows and columns and modify the script's framesPerRow and framesPerColumn (lines 10 and 11) settings manually - I had varying grid sizes for the same video, not sure what influences this :(
  8. print with "print background images" ticked
<!DOCTYPE html>
<html>
<head>
<script src="http://jashkenas.github.io/underscore/underscore-min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.frame-container {
background: black;
@paulkoegel
paulkoegel / i hate almost all software.markdown
Created September 30, 2014 12:38
Ryan Dahl - "I hate almost all software" (archived from https://plus.google.com/116904230181415286707/posts/DnAMAN5sUR8 - which is not the original post)

I hate almost all software. It's unnecessary and complicated at almost every layer. At best I can congratulate someone for quickly and simply solving a problem on top of the shit that they are given. The only software that I like is one that I can easily understand and solves my problems. The amount of complexity I'm willing to tolerate is proportional to the size of the problem being solved.

In the past year I think I have finally come to understand the ideals of Unix: file descriptors and processes orchestrated with C. It's a beautiful idea. This is not however what we interact with. The complexity was not contained. Instead I deal with DBus and /usr/lib and Boost and ioctls and SMF and signals and volatile variables and prototypal inheritance and C99_FEATURES and dpkg and autoconf.

Those of us who build on top of these systems are adding to the complexity. Not only do you have to understand $LD_LIBRARY_PATH to make your system work but now you have to understand $NODE_PATH too - there's my little addit