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 simpleupload.app | |
(:require [clasp.clasp :refer [defroute wrap-routes]] | |
[clojure.data.codec.base64 :as b64] | |
[clojure.java.io :as io] | |
[clojure.string :refer [split]] | |
[ring.middleware.multipart-params :refer [wrap-multipart-params]] | |
[ring.util.response :refer [response]])) | |
(def KEY "foo") |
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
(filter #(:macro %) (map #(meta (% (ns-publics *ns*))) (keys (ns-publics *ns*)))) |
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
# -*- coding: utf-8 -*- | |
''' | |
flask.ext.login | |
--------------- | |
This module provides user session management for Flask. It lets you log | |
your users in and out in a database-independent manner. | |
:copyright: (c) 2011 by Matthew Frazier. | |
:license: MIT/X11, see LICENSE for more details. |
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
(defmacro defroute | |
[routename uri meths handler] | |
`(defn | |
~(with-meta routename (assoc (meta routename) :route-handler true)) | |
[req#] | |
(let [req-meth# (:request-method req#) | |
bad-meth# (nil? (some #(= req-meth# %) ~meths)) | |
any-meth# (= ~meths [:any])] | |
(if (and (route-matches ~uri req#) (and bad-meth# (not any-meth#))) | |
(method-not-allowed req-meth# (get-allowed ~meths)) |
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
from rauth import OAuth2Service | |
import re | |
import webbrowser | |
try: | |
read_input = raw_input | |
except NameError: | |
read_input = input |
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
from rauth import OAuth2Service | |
import re | |
import webbrowser | |
try: | |
read_input = raw_input | |
except NameError: | |
read_input = input |
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
from rauth import OAuth1Service | |
try: | |
read_input = raw_input | |
except NameError: | |
read_input = input | |
# Get a real consumer key & secret from https://dev.twitter.com/apps/new | |
twitter = OAuth1Service( | |
name='twitter', |
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
from rauth import OAuth2Service | |
from hashlib import sha1 | |
from random import random | |
import re | |
import json | |
import webbrowser | |
# Get a real client id and secret from: |
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
import foo | |
foo.qux("test") |
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 testing.bar (:require [baz :refer :all])) | |
;; should expose the same function as foo, i.e. qux |