Skip to content

Instantly share code, notes, and snippets.

Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches.
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed.
Use <count> tags after each step to show the remaining budget. Stop when reaching 0.
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress.
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process.
Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach:
0.8+: Continue current approach
0.5-0.7: Consider minor adjustments
Below 0.5: Seriously consider backtracking and trying a different approach
@gnfisher
gnfisher / modern-ruby-rails-resources.md
Last active August 24, 2022 12:59
Modern Ruby on Rails Resources

Modern Ruby and Rail Resources

Hotwire

@gnfisher
gnfisher / modeling_forms_types.md
Last active June 1, 2020 22:36
Forms, Validations, and Static Types

Forms, Validations, and Static Types

Pitch your talk to the audience

Elm is a statically typed language that allows us to make impossible states impossible. But for those newer to Elm it isn't always obvious how to use this super power to solve their practical problems.

If you are still feeling a bit unsure yourself then join us as we use types to

@gnfisher
gnfisher / dotfiles
Last active March 17, 2020 18:12
Dotfiles
=== zshrc
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory autocd extendedglob
unsetopt beep
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
@gnfisher
gnfisher / Elm.md
Last active November 8, 2019 17:00
map2 : (a -> b -> c) -> Validatable a -> Validatable b -> Validatable c
map2 func v1 v2 =
case ( v1, v2 ) of
( Invalid a fatal warnings, Valid b ) ->
Invalid (func a b) fatal warnings
( Invalid a fa wa, Warnings b wb ) ->
Invalid (func a b) fa (wa ++ Nonempty.toList wb)
( Invalid a fa wa, Invalid b fb wb ) ->
@gnfisher
gnfisher / elm-types-glossary.md
Created August 14, 2019 15:07 — forked from JoelQ/elm-types-glossary.md
Elm Type Glossary

Elm Types Glossary

There's a lot of type terminology and jargon going around when discussing types in Elm. This glossary attempts to list some of the most common type terms along with synonyms, terms from other language communities, examples, and links to more detailed articles on each topic.

Custom Type

These are the basic building blocks of data modeling in Elm. This used to be

@gnfisher
gnfisher / union_scope.rb
Created January 9, 2018 17:39 — forked from tlowrimore/union_scope.rb
Unions multiple scopes on a model, and returns an instance of ActiveRecord::Relation.
module ActiveRecord::UnionScope
def self.included(base)
base.send :extend, ClassMethods
end
module ClassMethods
def union_scope(*scopes)
id_column = "#{table_name}.#{primary_key}"
sub_query = scopes.map { |s| s.select(id_column).to_sql }.join(" UNION ")
where "#{id_column} IN (#{sub_query})"
@gnfisher
gnfisher / ubuntu-setup
Last active October 18, 2017 23:38
Ubuntu setup
# Capslock? pshaw.
setxkbmap -option ctrl:nocaps
# Lets get to it
sudo apt-get update
# install a bunch of build and dev libraries
sudo apt-get install build-essential libpq-dev libssl-dev libyaml-dev libreadline6-dev \
zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev