Skip to content

Instantly share code, notes, and snippets.

View oldfartdeveloper's full-sized avatar

Scott Smith oldfartdeveloper

View GitHub Profile
@oldfartdeveloper
oldfartdeveloper / .README.md
Last active November 30, 2021 16:05
PureScript: using newtype with records

PureScript: using newtype with records

I ran into a beginner mistake that I was unable to figure out. So I posted to PureScript Discord and the conversation quickly showed me not only why what I did didn't work, but suggestions for how to fix it specifically. Kudos to @monoidmusician and @natefabion. Here's the discussion:

me

I have a compiler error that I'm just not understanding why it's happening: Here's the test code:

module Foo where
@oldfartdeveloper
oldfartdeveloper / possibleSumsJourney.md
Last active May 28, 2020 05:26
Working a Purescript Exercise (sums)

Introduction

This exercise shouldn't have been that challenging, but it stumped me. Here's my woeful journey with the path through it so that I can review my approach when I get stuck on the next exercise.

The Exercise

Found in the Purescript Book, exercise 2:

(Medium) Write a function possibleSums which uses foldM to determine all possible totals that could be made using a set of coins. The coins will be specified as an array which contains the value of each coin. Your function should have the following result: >

@oldfartdeveloper
oldfartdeveloper / CartesianProductExercise.md
Last active March 29, 2020 21:26
Cartesian product Exercise that I can't seem to get to compile on Purescript

Here's the code as part of a coding exercise (the 2nd one) here:

module CartesianProductExercise where
  
import Prelude

import Data.Tuple (Tuple(..))
@oldfartdeveloper
oldfartdeveloper / elmswitch
Last active September 5, 2019 05:02
A Bash script to switch between Elm 0.18 and 0.19
#!/usr/bin/env bash
#
# Switch between using different Elm family revisions; right now can switch between Elm 0.18.0 and Elm 0.19.0 revision
# "ecosystems". From the command line, invokde either
# elmswitch 18
# or
# elmswitch 19
#
# It is planned to add other revisions and patch revisions as desired.
#

Multiple MySQL Versions with Homebrew

NOTE: this is me experimenting w/ more recent versions. This isn't working yet.

For homebrew version 1.3.0.

brew -v # => Homebrew 1.3.0

Install the current version of mysql.

### Keybase proof
I hereby claim:
* I am oldfartdeveloper on github.
* I am oldfartdeveloper (https://keybase.io/oldfartdeveloper) on keybase.
* I have a public key ASDjaJO8NVzg3hCTtiT6HRrNYioJ7C_Zf6pK8LkqXCBwiAo
To claim this, I am signing this object:
@oldfartdeveloper
oldfartdeveloper / elixirconf_notes.org
Created October 23, 2015 23:14
My Elixirconf 2015 Austin Notes

Advanced Phoenix Traiing

Organization

  • web only has code that has no state. Changes to these files auto- restarts the server.
  • lib functionality manages state. (Note: server does not auto-reload w/ changes to these.

What is above is a property of :reloadable_paths.

@oldfartdeveloper
oldfartdeveloper / larubyconf.org
Created October 23, 2015 23:09
LA RubyConf 2015 Notes

LA RubyConf 2015

  • Hired, a placement company for developers is a sponsor

Build to last - Mike Moore - blomage

TL;DR

  • Write code for other programmers, not machines.
  • Code should represent the best understanding of the programmer when he writes it.
@oldfartdeveloper
oldfartdeveloper / gist:bc4ee2ce8978e933424e
Last active August 29, 2015 14:16
Declarative implementation of Imperative Cucumber-like RSpec

Here's the original:

require 'spec_helper'

feature "A user signing up for a beta invitation" do
  scenario "with valid parameters" do
    visit '/'
    fill_in "Name", with: "John Doe"
    fill_in "Email", with: "jdoe@example.com"
@oldfartdeveloper
oldfartdeveloper / orphanage_trip_instructions.md
Last active June 26, 2017 18:30
Driving Instructions to Orphanage from Dianne's House

Driving Instructions to Orphanage from Dianne's House

These instructions can be accessed two ways:

  • As a paper handout; see Dianne.
  • As a PDF file in your smart phone. The iPhone, for one, has iBooks which can hold a PDF file in your smart phone's memory and access it. Once loaded, you don't have to have a live Internet connection; this is handy when you want to turn off access in México to avoid (expensive!) roaming charges.