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.
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
| # Standalone script to try http://rom-rb.org/ with a database | |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'rom' | |
| gem 'rom-sql' | |
| gem 'rom-rails' | |
| gem 'activemodel' |
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
| iTerm2 emacs 24.2.1 -nw with paredit on OS X 10.8 Norwegian layout | |
| Left Command is my Meta. | |
| Left Alt used for inputting special characters. | |
| Caps Lock is mapped to Control. | |
| ο£Ώ > System Preferences > Keyboard > Keyboard > Special: Caps Lock: ^ Control | |
| iTerm > Preferences > Keys: Left Command key mapped to Right Option | |
| iTerm > Preferences > Profiles > Keys: Right option acts as: +Esc |
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
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
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
| ;; the SET game in clojure.spec | |
| ;; inspired by https://github.com/jgrodziski/set-game | |
| (require '[clojure.spec :as s]) | |
| (s/def ::shape #{:oval :diamond :squiggle}) | |
| (s/def ::color #{:red :purple :green}) | |
| (s/def ::value #{1 2 3}) | |
| (s/def ::shading #{:solid :striped :outline}) | |
| (s/def ::card (s/keys :req [::shape ::color ::value ::shading])) |
- 13" Macbook Pro 3.3 GHz i7 (late 2016)
- Microsoft Surface Book (2016)
- Acer K272HUL 27" monitor 2560 x 1440
- Ergotron monitor arm
- Perixx PERIMICE-712B
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 clj-spec-playground | |
| (:require [clojure.string :as str] | |
| [clojure.spec :as s] | |
| [clojure.test.check.generators :as gen])) | |
| ;;; examples of clojure.spec being used like a gradual/dependently typed system. | |
| (defn make-user | |
| "Create a map of inputs after splitting name." | |
| ([name email] |
Getting started:
Related tutorials:
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test