Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| <div id="g_id_onload" | |
| data-client_id="390285071447-nulpiuehvrjqg91cnah18sj52mlt9c2b.apps.googleusercontent.com" | |
| data-callback="handleCredentialResponse"> |
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height: 100%; |
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height: 100%; |
| /* | |
| Firefox and IE have the "choose file" button to the right of the | |
| filepath, while Webkit puts it on the left. This makes WebKit put | |
| it on the right as well. | |
| */ | |
| <input type="file"> | |
| input[type="file"]{ | |
| -webkit-appearance: none; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| (ns dom.core | |
| (:require [clojure.string :as str] | |
| [clojure.set :refer [difference union]])) | |
| ; sample usage: | |
| ; (-> (all ".class") (hide) (+css "titi") (clear) (html "<span>zob</span>") (show)) | |
| (defn- nodelist-coll [nodelist] | |
| (doall (map #(.item nodelist %) (range (.-length nodelist))))) |
| ;; This fn allows calling any method, as long as it's the first with that name in getDeclaredMethods(). | |
| ;; Works even when the arguments are primitive types. | |
| (defn call-method | |
| [obj method-name & args] | |
| (let [m (first (filter (fn [x] (.. x getName (equals method-name))) | |
| (.. obj getClass getDeclaredMethods)))] | |
| (. m (setAccessible true)) | |
| (. m (invoke obj (into-array Object args))))) |