Skip to content

Instantly share code, notes, and snippets.

View logaan's full-sized avatar
🥔
Starchy

Logan Campbell logaan

🥔
Starchy
View GitHub Profile
@logaan
logaan / designer.html
Last active August 29, 2015 14:12
designer
<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;
@logaan
logaan / designer.html
Created December 28, 2014 06:48
designer
<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">
(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"
(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
#!/usr/bin/env bash
export work=20
export break=5
while true
do
date
echo "Work for $work minutes"
say "Work for $work minutes"
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
# 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.
{: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"}
{:routes {"" :index,
"tickets" :tickets,
["tickets/" :id] :ticket,
"videos" :videos,
["videos/" :id] :video,
"events" :events,
["events/" :id] :event,
{: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",