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 honeysql.extensions.returning | |
(:require | |
[honeysql.format :as f] | |
[honeysql.helpers :as h])) | |
(defmethod f/format-clause :returning [[_ fields] _] | |
(str "RETURNING " (f/comma-join (map f/to-sql fields)))) | |
(f/register-clause! :returning 225) |
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
# Paste this into your /etc/hosts | |
# Then (if you're on a Mac) run 'sudo dscacheutil -flushcache' | |
# This will prevent your computer from accessing sites owned by Gawker Media, | |
# thus improving your internet experience. | |
0.0.0.0 gawker.com deadspin.com lifehacker.com gizmodo.com io9.com jalopnik.com jezebel.com kotaku.com io9.gizmodo.com |
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
#!/usr/bin/env bash | |
wifis=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s` | |
hwwifis=`echo "$wifis" | grep "Climate\|Volterra"` | |
tether=`echo "$wifis" | grep "Mike"` | |
if [ -n "$hwwifis" ] && [ -n "$tether" ]; then | |
growlnotify -s -m "stop tethering" | |
fi |
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
diff --git i/src/clj/clojure/core_deftype.clj w/src/clj/clojure/core_deftype.clj | |
index 97e14cc..eb98de8 100644 | |
--- i/src/clj/clojure/core_deftype.clj | |
+++ w/src/clj/clojure/core_deftype.clj | |
@@ -50,6 +50,18 @@ | |
(drop-while seq? (next s))) | |
ret))) | |
+(comment | |
+ (map deref |
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
Ok, this isn't quite rigorous, but I bet it's right anyway =P | |
Imagine F is discontinuous at some point, and jumps by like, 1. Well, if you | |
put x1 and x2 really close together around the point, we'll violate the | |
constraint, right? So let's make F nice and smooth instead. But let's say | |
somewhere F has a derivative of 1. Well, if we put x1 and x2, say, 0.01 apart, | |
then (x2-x1)^2 = 0.0001 but F is gonna change by 0.01, so that's out. | |
But however small we make the derivative, we can always squeeze the two points | |
closer together so that the function changes too fast. | |
Clearly it's just never allowed to change at all. F(x) = C. |
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
[java] FAIL in (seq-and-transducer) (transducers.clj:135) | |
[java] {:coll [0 0], | |
[java] :actions (->> coll (take 1)), | |
[java] :s (0), | |
[java] :xs (0 0), | |
[java] :xi [0 0], | |
[java] :xt [0 0]} | |
[java] | |
[java] expected: (:result res) | |
[java] actual: false |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDaq6hozejSIW4QG7eygagW17LgKGM1B3t5+evxF4UZP9L0Ki7kvZ27cEi5fVHIOTqNZRCTpqbjwnRRukI7jGwG1RHE3xF+Th2O5GjduAZydHYS8nYhY4BEfVNL/FUKE/kHcXqQ6ofO3m2s10ZStt5PVEP6f2N6pNwdxYUPz+1xqaYQ5KRoVeM0rRQx/oxoFbSl4aYZhJJ37ZGsXmZDSHe/1UFB7xJu3u06AD7yNSzU7n0XH47AyUFeZ659pFPM2wEaQr2f677mBHr5ZUJ9FCCtKN7fjDWSZIHT8EJCuHuiJHiF9NjGc1W9BW6MxQIo3AUlB+daFncJjuvbMpgZyYFn [email protected] |
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
; passes | |
(let [{:keys [bar foo] | |
:or {foo 1 | |
bar (inc foo)}} {}] | |
(assert (= foo 1)) | |
(assert (= bar 2))) | |
; does not compile | |
(let [{:keys [foo bar] | |
:or {foo 1 |
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
compile-clojure: | |
[java] Compiling clojure.core to /Users/michael.blume/workspace/clojure/target/classes | |
[java] Exception in thread "main" java.lang.LinkageError: loader constraint violation: loader (instance of clojure/lang/DynamicClassLoader) previously initiated loading for a different type with name "clojure/core/VecNode", compiling:(clojure/gvec.clj:124:1) | |
[java] at clojure.lang.Compiler.analyzeSeq(Compiler.java:6715) | |
[java] at clojure.lang.Compiler.analyze(Compiler.java:6499) | |
[java] at clojure.lang.Compiler.analyze(Compiler.java:6460) | |
[java] at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5840) | |
[java] at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5271) | |
[java] at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3900) | |
[java] at clojure.lang.Compiler.analyzeSeq(Compiler.java:6706) |
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
1 | |
2 3 | |
4 5 6 | |
7 8 9 10 | |