Skip to content

Instantly share code, notes, and snippets.

View chrisarcand's full-sized avatar
🏒

Chris Arcand chrisarcand

🏒
View GitHub Profile
@chrisarcand
chrisarcand / keybindings.json
Created April 4, 2019 15:21
VSCode customization....so far.
// Place your key bindings in this file to override the defaults
[
{
"key": "j",
"command": "list.focusDown",
"when": "listFocus"
},
{
"key": "ctrl+f",
"command": "list.focusPageDown",
@chrisarcand
chrisarcand / no-hazardous-asteroids-today.sentinel
Last active November 18, 2019 22:51
Example Sentinel HTTP import policy
# no-hazardous-asteroids-today.sentinel enforces that no
# "potentially hazardous" asteroids are approaching their
# closest point to Earth within 1,000,000 miles today. Because if
# there's a potentially hazardous asteroid reaching within a
# million miles o' here, we're way too nervous and distracted to
# be changing our infrastructure right now!
import "http"
import "json"
import "strings"
import "time"
class ApplicationRecord
def in_scope?(sym)
self.class.public_send(sym).exists?(id)
end
end
class Location < ApplicationRecord
scope :editable -> {...}
# OR