- response_type is a constant set for particular app on server (1)
- redirect_uri, too (1)
- "state" parameter is echoed by server and checked by client (1)
- hash of "state" parameters is stored in LocalStorage and destroyed on receiving redirect (1)
- "client_id" parameter is checked (after obtaining token, make a request to server to get "token_id" for this token and compare to existing one) (2, 3)
- IP is saved for particular token on grant and checked on access
- http://alohadharma.com/the-map/
- http://alohadharma.com/why-meditate/
- http://www.dharmaoverground.org/dharma-wiki/-/wiki/Main/MCTB+The+Theravada+Four+Path+Model
- http://www.dharmaoverground.org/dharma-wiki/-/wiki/Main/MCTB+A+Revised+Four+Path+Model
- http://alohadharma.com/general-dharma-teaching/
- http://alohadharma.com/how-to-meditate/
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
-module(tmp). | |
-behaviour(gen_server). | |
%% API | |
-export([start_link/0]). | |
%% gen_server callbacks | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, | |
terminate/2, code_change/3]). |
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
-module(foobar_tests). | |
-include_lib("proper/include/proper.hrl"). | |
-include_lib("eunit/include/eunit.hrl"). | |
prop_delete() -> | |
?FORALL({X,L}, {integer(),list(integer())}, | |
not lists:member(X, lists:delete(X, L))). | |
proper_test() -> | |
?assertEqual( |
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
(defrecord GHCache [^TTLCache ttl-cache etagged cleaner-c]) | |
(defn init-cache [] | |
(let [control-c (chan) | |
old-killer (fn [etagged] | |
(let [now (System/currentTimeMillis)] | |
(->> etagged | |
(filter #(> (- now (-> % value :created-at)) | |
(* 6 60 60 1000))) | |
(into {})))) |
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
curl -XPOST -d "source=`git config user.name`&from_address=`git config user.email`&subject=pushed to production&content=`git log --pretty=format:'%s %H' -n 1`" https://api.flowdock.com/v1/messages/team_inbox/YOUR_TOKEN_GOES_HERE |
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
(defn gaussian [m mu gamma] | |
(let [m (mp/clone m) | |
t (/ 1 (* gamma (Math/sqrt (* 2 Math/PI))))] | |
(magic/specialize :double | |
(loop-over [m] | |
(let [x (aget m-data m-idx) | |
exparg (* -0.5 (Math/pow (/ (- x mu) gamma) 2)) | |
g (* t (Math/exp exparg))] | |
(aset m-data m-idx g)))))) |
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
(def test-form1 | |
'(let [^String a "a"] | |
:ok)) | |
(def test-form2 | |
`(let [^String ~'a "a"] | |
:ok)) | |
(def test-form3 | |
`(let [^String a# "a"] |
NewerOlder