Skip to content

Instantly share code, notes, and snippets.

View pepe's full-sized avatar

Josef Pospíšil pepe

View GitHub Profile
(require '[clojure.zip :as zip])
(defn zzz [root] (zip/zipper vector? rest (fn [[x _ _] children] (vec (cons x children))) root))
(def tree ["Bea" ["Ales" ["Tom"] ["Atom" ["Elektron" ["Quark"] ["Bark"]] ["Proton"]]] ["Jarko" ["Letko"] ["Zimko" ["Prosko"] ["Ledko"]]]])
(defn normalize-tree [root lenght]
(loop [loc (zzz root) lookup {} result []]
(if (zip/end? loc)
result
@pepe
pepe / contemporary-backend-development.md
Last active February 13, 2017 20:09
Contemporary Backend Development - CULS
author date title
Pepe
2017-02-12
The Intro

Contemporary Backend Development


@pepe
pepe / decks.md
Last active December 25, 2016 18:43
Sample Markdown for showrum
author date title
Pepe
2016-12-12
The Intro

Showrum Presentation Software


@pepe
pepe / init.lua
Created March 11, 2016 08:49
Time giving hammerspoon snippet
-- Quit Slack, then run it after 30 minutes
hs.hotkey.bind({"ctrl", "alt", "cmd", "shift"}, "L", function()
hs.alert.show(" No Slacking", 0.5)
hs.application.find("Slack"):kill()
hs.timer.doAfter(1800, function()
hs.application.launchOrFocus("Slack")
hs.alert.show(" Slacking", 0.5)
end)
end)
@pepe
pepe / statuses_spec.md
Created March 8, 2016 08:35
Oh look, this markdown is also spec.

Statuses Page

  • On statuses page

Showing all teams

  • Verify "7" other statuses
@pepe
pepe / gist:a0167048205580a00a99
Last active August 31, 2015 14:20 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan Developer Preview 2

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@pepe
pepe / gist:04b1f88dd269bf43a283
Last active August 29, 2015 14:16
keybase.md
### Keybase proof
I hereby claim:
* I am pepe on github.
* I am pp (https://keybase.io/pp) on keybase.
* I have a public key whose fingerprint is C323 3C75 F2BF 8FA1 52DE 1B2C B1FF F69C 961B 9BE2
To claim this, I am signing this object:
@pepe
pepe / zrb.md
Created May 23, 2014 13:47
Žižkov RB text

Who we are, what we want?

We are group of programmers, with Ruby as the weapon of choice. But we are not defending ourselves against any new experience or weapons. Under the organization we are mostly looking to help with open source software development,

If you think, that six (for now) hands can help you with your project, do not hesitate and contact us. We do not guarantee nothing, but we are mostly accepting chalenges.

Hetman Retro, colonel Pepe and sergeant Paja

@pepe
pepe / index.html
Last active December 13, 2015 17:08
Those days cmx.io
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">Those days</tspan>
</label>
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59">
@pepe
pepe / mountain-lion-brew-setup.markdown
Created July 30, 2012 08:19 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.