Skip to content

Instantly share code, notes, and snippets.

View scotthelm's full-sized avatar

Scott Helm scotthelm

View GitHub Profile
@scotthelm
scotthelm / README.md
Last active February 14, 2022 14:49
slack to utf-8 wordle converter

Slack Emjoi to UTF-8 Wordle Converter

This utility converts a wordle message from slack to the utf-8 equivalent.

Installation

Place the wconv.rb file in a directory in your PATH and make it executable chmod +x.

Usage

$ ruby -e 'f=->(a, b, i, t){puts a; i += 1; f.(b, a + b, i, t) if i < t}; f.(0, 1, 0, gets.to_i)'
10
0
1
1
2
3
5
8
13

That Time It All Went Disastrously Right

So...This past week I was on vacation at Pawley's Island, SC. Because it's an island, there is a tidal creek that feeds into a saltwater marsh. When the tide comes in, the creek flows one way, and when the tide goes out it flows the other way. The house we rent has a dock on the creek.

The Disaster

We decide to rent kayaks. The plan is to ride current out to the mouth of the inlet, hang out for a bit and ride the tide current back to the house. But when we get to the sea, the breakers didn't look bad at all - so we decide to try to get past them and out to sea (the kyaks are designed for open-sea).

We get about 20 feet into the breakers and a wave gets my nephew sideways, the next puts him into my son and I, and the third capsizes him. There's also a strong current out to sea, so he's hanging on to the kyak, and starting to drift away. So I hand my oar to my son and tell him to get back to the beach. (He does). And I swim over to the nephew and flip the kyak ov

@scotthelm
scotthelm / clone_dotfiles
Last active February 2, 2018 13:51
Clone Dotfiles to new machine
git clone --bare https://github.com/scotthelm/dotfiles.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";
@scotthelm
scotthelm / setup_dotfiles_config.sh
Created February 2, 2018 02:00
Create bare config git repository for dotfiles
git init --bare $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zshenv

Keybase proof

I hereby claim:

  • I am scotthelm on github.
  • I am helmish (https://keybase.io/helmish) on keybase.
  • I have a public key ASBuNXmc3cb3iYm-YXmvjhtcJppE04kz390Us6BzGsAzXgo

To claim this, I am signing this object:

def states
{
"Alabama" => "AL",
"Alaska" => "AK",
"Arizona" => "AZ",
"Arkansas" => "AR",
"California" => "CA",
"Colorado" => "CO",
"Connecticut" => "CT",
"Delaware" => "DE",