Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
; Depends on [com.notnoop.apns/apns "0.1.6"]. | |
(:import ('com.notnoop.apns APNS)) | |
(defn send-push-notification [device-token message] | |
(let [service (.build (.withSandboxDestination | |
(.withCert (APNS/newService) "resources/apns-dev-cert.p12" "password"))) | |
payload (.build (.alertBody (APNS/newPayload) message))] | |
(.push service device-token payload))) |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
BEGIN:VCALENDAR | |
CALSCALE:GREGORIAN | |
X-WR-TIMEZONE;VALUE=TEXT:US/Central | |
METHOD:PUBLISH | |
PRODID:-//Park Cities Presbyterian Church\(PCA\)//iCal 1.0//EN | |
X-WR-CALNAME;VALUE=TEXT:Park Cities Presbyterian Church Events Feed | |
VERSION:2.0 | |
BEGIN:VEVENT |
function toWKT(layer) { | |
var lng, lat, coords = []; | |
if (layer instanceof L.Polygon || layer instanceof L.Polyline) { | |
var latlngs = layer.getLatLngs(); | |
for (var i = 0; i < latlngs.length; i++) { | |
latlngs[i] | |
coords.push(latlngs[i].lng + " " + latlngs[i].lat); | |
if (i === 0) { | |
lng = latlngs[i].lng; | |
lat = latlngs[i].lat; |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
(ns user) | |
(def app | |
"Intenal Helper" | |
(fnil conj [])) | |
(defprotocol PathSeq | |
(path-seq* [form path] "Helper for path-seq")) | |
(extend-protocol PathSeq |
diff --git a/plugin/fireplace.vim b/plugin/fireplace.vim | |
index 6c32caa..a415bf8 100644 | |
--- a/plugin/fireplace.vim | |
+++ b/plugin/fireplace.vim | |
@@ -232,7 +232,9 @@ function! s:repl.piggieback(arg, ...) abort | |
else | |
let arg = ' :repl-env ' . a:arg | |
endif | |
- let response = connection.eval('(cemerick.piggieback/cljs-repl'.arg.')') | |
+ "let response = connection.eval('(cemerick.piggieback/cljs-repl'.arg.')') |
(ns nested-routing.core | |
(:require-macros [om.core :as om] | |
[secretary.core :refer [defroute]]) | |
(:require [om.dom :as dom] | |
[om.core :as om] | |
[secretary.core :as secretary] | |
[goog.events :as events] | |
[goog.history.EventType :as EventType]) | |
(:import goog.History)) |
Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
Integrating third party JavaScript libraries not written with Google Closure Compiler in mind continues to both be a source of error for users when going to production, and significant vigilance and effort for the the broader community (CLJSJS libraries must provide up-to-date and accurate externs).
In truth writing externs is far simpler than most users imagine. You only need externs for the parts of the library you actually intend to use from ClojureScript. However this isn't so easy to determine from Closure's own documentation. Still in the process of writing your code it's easy to miss a case. In production you will see the much dreaded error that some mangled name does not exist. Fortunately it's possible to enable some compiler flags :pretty-print true :pseudo-names true
to generate an advanced build with human readable names. However debugging missing externs means compiling your production build for each missed case. So much time wasted for such simple mistakes damages our sen
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use: