In VSCode, the default key binding for ctrl+,
points to the settings menu.
The number of times people access settings windows is far more less than the number of times s-expressions are executed.
I modified calva key bindings to use ctrl+,
(ctrl+oem_comma) instead of ctrl+alt+c
.
I also remapped the workbench settings keybinding to ctrl+, g
so that it is still accessible.
I left the Paredit settings unmodified. However, they are included in the below gist for reference.
All the when clause of "when": "editorTextFocus && editorLangId == 'clojure'"
so that their scope is limited to clojure only.
This file contains 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
require('es6-promise').polyfill(); | |
var hue = require("node-hue-api"), | |
HueApi = hue.HueApi, | |
lightState = hue.lightState; | |
var mqtt = require('mqtt'); | |
var schedule = require('node-schedule'); | |
// Exit once an hour to force a re-read of the Hue lights list | |
var j = schedule.scheduleJob(new Date((new Date()).getTime()+3600000), function() { | |
console.log("[" + new Date() + "] " + "Exiting after pre-set delay."); |
This file contains 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
class CustomError < StandardError | |
def initialize(e = nil) | |
super e | |
set_backtrace e.backtrace if e | |
end | |
end | |
def run | |
r = Runner.new | |
r.fail |
This file contains 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
See question on stack overflow: http://stackoverflow.com/questions/28595636/rails-4-how-to-give-alias-names-to-includes-and-joins-in-active-record-que | |
- Model Student and model Teacher are both STI models with super class model User | |
- Model Story is a STI model with super class model Task | |
- includes() and joins(), both fails | |
Rails alias naming convention (includes() and joins()) | |
- One model as parameter | |
- is base model (includes(:users)) |
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
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: |
Getting started:
Related tutorials:
This file contains 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] |
- 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 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])) |
NewerOlder