Skip to content

Instantly share code, notes, and snippets.

View NoamB's full-sized avatar

Noam Ben Ari NoamB

View GitHub Profile
@coltnz
coltnz / clojure-repl-log-level-logback
Created February 12, 2015 00:28
set clojure tools logging level in repl (logback version)
; in user.clj
(:import [org.slf4j LoggerFactory]
[ch.qos.logback.classic Logger Level]
(defn set-log-level! [level]
(.. (LoggerFactory/getLogger org.slf4j.Logger/ROOT_LOGGER_NAME)
(setLevel (Level/valueOf (.toUpperCase (name level))))))
@sebsto
sebsto / gist:19b99f1fa1f32cae5d00
Created August 8, 2014 15:53
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@adeel
adeel / push-notifications.clj
Created July 26, 2011 01:03
Example of sending Apple push notifications with Clojure.
; 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)))