Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="g_id_onload"
data-client_id="390285071447-nulpiuehvrjqg91cnah18sj52mlt9c2b.apps.googleusercontent.com"
data-callback="handleCredentialResponse">
@danieldroit
danieldroit / dabblet.css
Created April 23, 2020 13:05
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@danieldroit
danieldroit / dabblet.css
Created April 23, 2020 13:04
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@danieldroit
danieldroit / gist:8ee400956ccf9c65278096a483a5dc0f
Created February 7, 2018 22:03 — forked from snowman-repos/gist:3816272
CSS: Webkit File Upload Button to the Right
/*
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;
@danieldroit
danieldroit / web-servers.md
Created January 29, 2018 11:42 — forked from willurd/web-servers.md
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@danieldroit
danieldroit / dom-core.cljs
Created January 25, 2018 13:33 — forked from nikopol/dom-core.cljs
minimalist dom manipulation clojure script library
(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)))))
@danieldroit
danieldroit / private.clj
Created January 24, 2018 16:49 — forked from egamble/private.clj
Two ways to call private methods in Clojure.
;; 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)))))