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
config.assume_ssl = true | |
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | |
config.force_ssl = true | |
... | |
# based on https://github.com/Purple-Devs/health_check/issues/25#issuecomment-432819017 | |
config.ssl_options = { redirect: { exclude: ->(request) { request.path == '/up' } } } | |
# and/or |
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
const Space = ({ | |
margin, | |
marginRight, | |
marginLeft, | |
marginTop, | |
marginBottom, | |
padding, | |
bottom, | |
top, | |
left, |
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
function dateToLocal(date) { | |
let localOffset = new Date().getTimezoneOffset() * 60 * 1000; | |
let d = new Date(Date.parse(date)); | |
return new Date(d.getTime() + localOffset); | |
} |
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
{ | |
"createdBy": "Redirector v3.5.3", | |
"createdAt": "2021-10-16T12:28:52.532Z", | |
"redirects": [ | |
{ | |
"description": "Medium -> Scribe", | |
"exampleUrl": "https://medium.com/@user/post-123456abcdef", | |
"exampleResult": "https://scribe.rip/@user/post-123456abcdef", | |
"error": null, | |
"includePattern": " *medium.com/(.*)", |
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
#!/bin/sh | |
dir=app | |
files=*.js | |
output=dist.js | |
find $dir/$files -exec cat {} \; > $output | |
while true; do | |
watch -d -g ls -lR $dir/$files |
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
! undo any meta keys already set | |
clear Mod1 | |
! keycodes 63 and 71 are the left and right COMMAND buttons adjacent to the spacebar; set them to be control keys | |
keycode 63 = Control_L | |
keycode 71 = Control_R | |
! keycodes 66 and 69 are the option/alt keys; assign them as Meta keys | |
keycode 66 = Escape NoSymbol Escape | |
keycode 69 = Meta_R |
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
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p' | |
xmodmap -e "keycode 133 = Alt_L" | |
xmodmap -e "keycode 37 = Control_L" | |
xmodmap -e "keycode 64 = Control_L" |
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
https://miragejs.com/ |
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
{ | |
"name": "test", | |
"version": "1.0.0", | |
"description": "Hello.", | |
"main": "index.js", | |
"scripts": { | |
"cachebust": "cachebust" | |
}, | |
"author": "", | |
"license": "ISC", |
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
#!/usr/bin/env ruby | |
$prefix = 'com.apple.TimeMachine.' | |
$host = 'rsync' | |
$repo = 'laptop' | |
# Where the snapshot will be mounted. | |
$mount = "#{Dir.home}/borg" | |
$ref_file = "#{Dir.home}/.borg-snapshot" | |
# Define exclusions here. | |
# https://borgbackup.readthedocs.io/en/latest/usage/help.html#borg-help-patterns | |
$exclude_file = "#{Dir.home}/.borg-exclude.txt" |
NewerOlder