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
<link rel="import" href="../topeka-elements/theme.html"> | |
<link rel="import" href="../topeka-elements/topeka-resources.html"> | |
<link rel="import" href="../topeka-elements/topeka-quiz-view.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<polymer-element name="my-element"> |
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
(ns waving-hands | |
(:require | |
[clojure.set :refer [union]] | |
[midje.sweet :refer :all])) | |
; Capital letters mean both hands | |
(def spells | |
{"cdpw" "Dispel Magic" | |
"cswws" "Summon Elemental" | |
"cW" "Magic Mirror" |
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
(def state | |
{:age-of-friends {:punky 2 | |
:kitsune 1}}) | |
; either this | |
(-> state | |
(update-in [:age-of-friends :punky] inc) | |
(update-in [:age-of-friends :kitsune] inc)) | |
; or this |
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 bash | |
export work=20 | |
export break=5 | |
while true | |
do | |
date | |
echo "Work for $work minutes" | |
say "Work for $work minutes" |
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
parent = self() | |
# Spawns an Elixir process (not an operating system one!) | |
spawn_link(fn -> | |
send parent, {:msg, "hello world"} | |
end) | |
# Block until the message is received | |
receive do | |
{:msg, contents} -> IO.puts contents |
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
# Single line comments start with a number symbol. | |
# There's no multi-line comment, | |
# but you can stack multiple comments. | |
# To use the elixir shell use the `iex` command. | |
# Compile your modules with the `elixirc` command. | |
# Both should be in your path if you installed elixir correctly. |
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
{:class "events", | |
:links [{:rel ["self"], :href "http://localhost:8080/events"}], | |
:actions [{:name "add-event", | |
:title "Add Event", | |
:method "POST", | |
:href "http://localhost:8080/events", | |
:type "application/edn", | |
:fields [{:name :event/name, :type :text, :title "Name"} |
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
{:routes {"" :index, | |
"tickets" :tickets, | |
["tickets/" :id] :ticket, | |
"videos" :videos, | |
["videos/" :id] :video, | |
"events" :events, | |
["events/" :id] :event, |
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
{:class "event", | |
:links [{:rel ["self"], :href "http://localhost:8080/events/17592186045537"} | |
{:rel ["listing"], :href "http://localhost:8080/events"}], | |
:properties {:db/id 17592186045537, | |
:event/price 12, | |
:event/hashtag "fdsa", | |
:event/facebook-event #uri "http://example.com", | |
:event/venue "asdf", |