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
(defun cider-with-profile (profile) | |
"Starts up a cider repl using jack-in with the specific lein profile | |
selected." | |
(interactive "sProfile: \ns") | |
(let* ((profile-str (symbol-name profile)) | |
(profile-str (replace-regexp-in-string ":\\(.*\\)$" "\\1" profile-str)) | |
(lein-params (concat "with-profile +" profile-str " repl :headless"))) | |
(setq cider-lein-parameters lein-params) | |
(cider-jack-in))) |
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 my.namespace | |
(:require | |
[com.stuartsierra.component :as component])) | |
(defrecord ExampleComponent [options foo] | |
component/Lifecycle | |
(start [this] | |
(println ";; Starting ExampleComponent") | |
;; In the 'start' method, a component may assume that its |
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 some-namespace | |
(:require | |
[om.core :as om] | |
[om.dom :as dom])) | |
(defn time-widget | |
[{:keys [msg-time] :as msg} owner] | |
(reify | |
om/IRenderState | |
(render-state [_ _] |
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
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
-- Generates a single diamond line with the alphabet char in the right position. | |
dline :: Int -> Int -> Int -> [Char] -> [Char] -> [Char] | |
dline len idx idx2 as ls | |
| idx2 == (succ len) = ls ++ (reverse . init) ls | |
| idx2 == idx = (dline len idx (succ idx2) as (ls ++ [(as !! (len - idx2))])) | |
| otherwise = (dline len idx (succ idx2) as (ls ++ "-")) |
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 diamond.core) | |
(def alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ") | |
(defn append-end | |
"Takes a diamond string and appends the reverse of the string minus | |
first char, so i.e. ---A becomes ---A---, D--- becomes D-----D, etc." | |
[s] | |
(str s (apply str (reverse (butlast s))))) |
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
$ gem install riemann-tools | |
Building native extensions. This could take a while... | |
ERROR: Error installing riemann-tools: | |
ERROR: Failed to build gem native extension. | |
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb | |
creating Makefile | |
make "DESTDIR=" | |
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin13/ruby/config.h', needed by `yajl.o'. Stop. |
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
import Data.List | |
import Data.Map | |
-- Aluminum = alum | |
-- Copper = copper | |
-- Iron = iron | |
-- Blue = blue | |
-- Grey = grey | |
-- Textured = textured | |
-- Coated = coated |
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
(λx.P)[x := N] = λx.P; | |
(λy.P)[x := N] = λy.P[x := N], if y ̸∈ FV(N) or x ̸∈ FV(P); | |
(λy.P)[x := N] = λz.P[y := z][x := N], if y ∈ FV(N) and x ∈ FV(P). |
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
$ runhaskell W1Test.hs | |
Impl/Test.hs:31:3: Warning: | |
In the use of ‘printTestCase’ | |
(imported from Test.QuickCheck.Property): | |
Deprecated: "Use counterexample instead" | |
W1Test.hs:39:33: | |
Ambiguous occurrence ‘===’ | |
It could refer to either ‘Impl.Test.===’, |
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
user=> keys-as-str | |
"#{\"CostCenterOfficeCode\" \"CostCenterFirmFunctionMediumDesc\" \"Date_LastDayWorked\" \"CostCenterOfficeDesc\" \"JobLevelText\" \"FacilityRegionCode\" \"Name_Last\" \"CostCenterServiceLineCode\" \"Date_MostRecentHire\" \"CompanyCodeDesc\" \"CostCenterServiceLineDesc\" \"PersonnelAreaDesc\" \"MasterCostCenterName\" \"CostCenterServiceAreaMediumDesc\" \"Name_PreferredFirst\" \"FacilityRegionDesc\" \"FacilityCode\" \"Date_Valid_From\" \"PersonnelSubareaCode\" \"FacilityName\" \"Date_Valid_To\" \"PersonnelSubareaDesc\" \"CostCenterServiceAreaCode\" \"Date_OriginalHire\" \"Email_Address\" \"Name_OutlookDisplayName\" \"EmployeeGroupDesc\" \"JobText\" \"IsPPD\" \"PersonnelAreaCode\" \"PreferredFullName\" \"IsManager\" \"CostCenterFirmFunctionCode\" \"Name_Middle\" \"EmployeeGroupCode\" \"Date_EmployeeTerminated\" \"JobLevelCode\" \"EmployeeAlias\" \"Phone_Desk\" \"PersonnelNbr\" \"Date_PartnerTerminated\" \"Addr_PersonnelAreaOfficeCity\" \"CompanyCode\" \"Name_First\" \"MasterCostCenterNumber\"} |