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 Memento | |
attr_accessor :state | |
def initialize(state) | |
@state = state | |
end | |
end | |
class Caretaker | |
attr_reader :memento |
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 keyboard_pic = document.querySelector('div#home-card img') | |
const keyCode = "ASDFU" | |
let keyStack = "" | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function rgbKeyboard() { | |
keyboard_pic.src = "images/keyboard-lit.jpg" |
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 bash | |
# git-copy [options] SOURCEFILE NEWFILE | |
usage() { | |
cat 1>&2 <<USAGE | |
usage: git-copy [options] SOURCEFILE NEWFILE | |
Copies a SOURCEFILE within a git repo to a NEWFILE in a way | |
that preserves the change history so that changes in SOURCEFILE | |
are still viewable in NEWFILE. |