- Tim Pope on commit messages
- PR Templates
- Another thing about PR templates
- Intro to CI This covers CD as well which I'm guessing you won't be doing, but toward the end it talks about CI and has some good info.
- Atlassian Guide to PRs
- When to make a commit This guy writes a lot of good things about git as well as writing cleaner code in general.
- A thing I wrote a while back about my preferred git workflow. It might be overkill for your purposes, but it gives you a nice clean git history which is actuall
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
require 'benchmark' | |
require 'faker' | |
require 'securerandom' | |
n = 5000 | |
Benchmark.bm(26) do |x| | |
NUM = 123.freeze | |
PASSWORD = "Password!1".freeze | |
UUID = SecureRandom.uuid.freeze | |
RAND = 1000.freeze |
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 Foo | |
class FooError < StandardError; end | |
def rescuer | |
failer | |
rescue FooError => e | |
puts "Rescued #{e}" | |
end | |
def failer | |
raise FooError.new("FAILED") |
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 | |
if [["-h" = "$1" || "--help" = "$1" || $# != 1 ]]; then | |
echo "Switches your JAVA_HOME from jdk using /usr/libexec/java_home. USAGE: " | |
echo " jdk [1.8 | 11]" | |
echo "Your current JAVA_HOME=$JAVA_HOME" | |
exit | |
else | |
export JAVA_HOME=`/usr/libexec/java_home -v $1` | |
echo "You now have JAVA_HOME=$JAVA_HOME" |
This seems plausible. It would be a good bike and ski MMAF mission. (Here's the link to that version) The avalanche hazard seems reasonable to mitigate.
Here's another variant where you drive up to the east side and start from there (13 mi, 2k vert): http://www.hillmap.com/m/ag1zfmhpbGxtYXAtaGRychULEghTYXZlZE1hcBiAgIDM3vSlCgw
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 | |
set -ex | |
sudo apt update | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.6.1 | |
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc | |
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc |
This is the recipe I used to make Chili for the Post-Turing bash. It was well received. The source is this gnarly sounding blog called Alaska from scratch
- 1lb ground turkey, beef, or moose (I used moose)
- 1 onion, chopped
- 4 cloves of garlic, smashed and minced
- 1/3c tomato paste
- 1 (14oz) can diced tomatoes (or tomato sauce, your preference)
- 1 (14oz) can red kidney beans, rinsed
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
defmodule StreamLines do | |
@path "./some_text.txt" | |
def large_lines!(path \\ @path) do | |
path | |
|> File.stream! | |
|> Stream.map(&String.replace(&1, "\n", "")) | |
|> Enum.filter(&(String.length(&1) > 70)) | |
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
defmodule Mods do | |
def list_len(list) do | |
list_len(0, list) | |
end | |
defp list_len(acc, []), do: acc | |
defp list_len(acc, [_h|t]) do | |
list_len((acc + 1), t) | |
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
%Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{}, | |
before_send: [#Function<1.27086174/1 in Plug.Logger.call/2>, | |
#Function<0.78287744/1 in Phoenix.LiveReloader.before_send_inject_reloader/1>], | |
body_params: %{"AccountSid" => "My-Account-Sid", | |
"ApiVersion" => "2010-04-01", "Body" => "Hello", "From" => "+12076666", | |
"FromCity" => "PORTLAND", "FromCountry" => "US", "FromState" => "ME", | |
"FromZip" => "04101", "MessageSid" => "SMb9ef4379773d0515b906ea007d5a3934", | |
"NumMedia" => "0", "NumSegments" => "1", | |
"SmsMessageSid" => "some-SmsMessageSid", | |
"SmsSid" => "some-SmsSid", "SmsStatus" => "received", |
NewerOlder