This file contains hidden or 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
| echo '-> installing `xcode-select`' | |
| xcode-select --install | |
| echo '-> installing `homebrew`' | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| echo '-> enable `homebrew/bundle`' | |
| brew tap homebrew/bundle | |
| echo '-> install packages from `Brewfile`' |
This file contains hidden or 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
| CURRENT="`pwd`" | |
| echo 'Keep-alive: update existing `sudo` time stamp until `.osx` has finished' | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
| echo 'Menu bar: disable transparency' | |
| defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool true | |
| echo 'Menu bar: show remaining battery time (on pre-10.8); hide percentage' | |
| defaults write com.apple.menuextra.battery ShowPercent -string "NO" |
This file contains hidden or 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
| Verifying that "zaiste.id" is my Blockstack ID. https://onename.com/zaiste |
This file contains hidden or 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
| require 'data_mapper' | |
| require 'dm-pg-types' | |
| DataMapper.setup(:default, 'postgres://localhost/play') | |
| class Person | |
| include DataMapper::Resource | |
| property :id, Serial | |
| property :name, String |
This file contains hidden or 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 om-tictactoe.core | |
| (:require [om.core :as om :include-macros true] | |
| [om.dom :as dom :include-macros true])) | |
| (enable-console-print!) | |
| (def app-state (atom {:tiles ["o" "" "" | |
| "" "x" "" | |
| "" "" ""] | |
| :turn "o"})) |
This file contains hidden or 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 clojure-xml-example.core | |
| (:require [clojure.data.xml :as xml]) | |
| (:gen-class)) | |
| (def bookshelf | |
| (xml/element :books {} | |
| (xml/element :book {:author "Stuart Halloway"} | |
| "Programming Clojure") | |
| (xml/element :book {:author "Christian Queinnec"} | |
| "Lisp in Small Pieces") |
This file contains hidden or 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
| -module(play). | |
| -export([fall_velocity/2, fall_velocity2/2, fall_velocity3/2, countdown/1, countup/1, factorial/1, product/1, falls/1, tripler/2, square/1, report/1]). | |
| fall_velocity({Planemo, Distance}) -> | |
| fall_velocity(Planemo, Distance). | |
| fall_velocity(earth, Distance) when Distance >= 0 -> | |
| math:sqrt(2 * 9.8 * Distance); | |
| fall_velocity(moon, Distance) when Distance >= 0 -> | |
| math:sqrt(2 * 1.6 * Distance); |