Skip to content

Instantly share code, notes, and snippets.

View LukasRychtecky's full-sized avatar

Lukáš Rychtecký LukasRychtecky

View GitHub Profile
@parallelo3301
parallelo3301 / utils.sql
Last active May 6, 2024 02:56
PostgreSQL utils
-- v5
----------------------------------------------------------- basic instance info
-- show db version
SELECT version();
-- uptime
SELECT pg_postmaster_start_time();
-- show connections
@danielytics
danielytics / gist:d4374cd51deec7201250
Last active March 7, 2018 16:24
Wrap React components for access in Reagent
;; Eclipse Public License 1.0 http://opensource.org/licenses/eclipse-1.0.php
(defn make-wrapped-component
"Wrap a React component in such a way that the raw JS component is accessible.
Useful for for calling methods on the native React component."
[component]
(fn [attrs & children]
(r/create-class
{:component-did-mount
(fn [this]
@john2x
john2x / 00_destructuring.md
Last active July 9, 2024 01:38
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences