I hereby claim:
- I am jespr on github.
- I am jespr (https://keybase.io/jespr) on keybase.
- I have a public key whose fingerprint is 7448 C110 1AA3 3440 4D7E A01D 0A7E 6752 334E 65AF
To claim this, I am signing this object:
// dayOffset("Wednesday", 4) | |
// => "Sunday" | |
const dayOffset = (day, offset) => { | |
const days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; | |
if (days.indexOf(day) === -1) { | |
return "😭 Not a valid day, dummy!"; | |
} | |
<script> | |
document.addEventListener("DOMContentLoaded", function () { | |
var formSelector = 'form'; | |
document.querySelector(formSelector).addEventListener("submit", function (e) { | |
var isValid = true; | |
// Match all fields that have aria-required="true" | |
var requiredFields = document.querySelectorAll("[aria-required='true']") | |
// Loop over all required fields |
<a href="http://facebook.con" target="_blank">Test</a> |
# Usage: ruby spaces.rb haha 2 | |
# => "h a h a" | |
input, spaces = ARGV[0], ARGV[1] | |
output = "" | |
input.split('').each do |char| | |
output << char | |
output << " " * spaces.to_i | |
end |
I hereby claim:
To claim this, I am signing this object:
Pizza med ananas og koriander Jamie Oliver Style |
#!/usr/bin/env ruby | |
# Inspiration from: | |
# http://jish.github.com/pre-commit/ | |
# https://gist.github.com/2711625 | |
messages = [] | |
HASHROCKET_PATTERN = ":[@$_A-Za-z][_A-Za-z0-9]*[=!?]? *=> *" | |
# Find the names of all the filenames that have been (A)dded (C)opied or (M)odified |
{ "keys": ["#"], "command": "insert_snippet", "args": {"contents": "#{$0}"}, "context": | |
[ | |
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, | |
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, | |
{ "key": "following_text", "operator": "regex_contains", "operand": "^(\"$)", "match_all": true } | |
] | |
}, | |
{ "keys": ["#"], "command": "insert_snippet", "args": {"contents": "#{${0:$SELECTION}}"}, "context": | |
[ | |
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, |