Set | Weight | Reps | Rest |
---|---|---|---|
Set 1 | 205 (100%) | AMRAP | 3 minutes |
Set 2 | 185 (90%) | AMRAP | 3 minutes |
Set 3 | 165 (80%) | AMRAP | 5 minutes |
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 app = async () => { | |
// encrypt message | |
const first = 'Hello, World!' | |
const key = await generateKey() | |
const { cipher, iv } = await encrypt(first, key) | |
// pack and transmit | |
await fetch('/secure-api', { | |
method: 'POST', | |
body: JSON.stringify({ |
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
█▄▄▄ ▄ | |
█▄█▄ ▄▄█ ▄█▄ ▄▄ ███ ▄▄█ ▄▄▄ |
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/bash | |
# only convert the path if one is provided | |
if [ ! -z $1 ] | |
then | |
linuxPath="$(realpath $1)" | |
windowsPath="$(wslpath -w $linuxPath)" | |
fi | |
# avoid the UNC path warning |
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 doTheThing(element) { | |
let children = Array.from(element.childNodes); | |
if (children.length) { | |
children.forEach(child => doTheThing(child)); | |
} else { | |
element.textContent = 'hi'; | |
} | |
} |
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
<!-- app/views/notifications/index.html.erb --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/he/1.2.0/he.min.js" integrity="sha256-awnFgdmMV/qmPoT6Fya+g8h/E4m0Z+UFwEHZck/HRcc=" crossorigin="anonymous"></script> | |
<script> | |
const notifications = JSON.parse( | |
// Rails encodes special characters for our security when interpolating strings into views | |
// the he library allows us to safely convert those characters back | |
he.decode('<%= notifications.to_json %>') | |
); | |
// do something with the notifications |
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
# app/controllers/notifications_controller.rb | |
class NotificationsController < ApplicationController | |
helper_method :notifications | |
def index | |
# automatically renders app/views/notifications/index.html.erb | |
end | |
private |
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 Promise | |
def initialize(&callback) | |
@callback = callback | |
@next_promise = nil | |
end | |
def resolve(callback_result = nil) | |
callback.call(callback_result).tap do |result| | |
next_promise.resolve(result) if next_promise | |
end |
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
# generate a Rails migration timestamp | |
Time.now.strftime('%Y%m%d%H%M%S') |
Set | Weight | Reps | Rest |
---|---|---|---|
Set 1 | 200 (100%) | 8 | 3 minutes |
Set 2 | 180 (90%) | 9 | 3 minutes |
Set 3 | 160 (80%) | 9 | 5 minutes |
NewerOlder