Skip to content

Instantly share code, notes, and snippets.

@7hoenix
7hoenix / README.md
Created March 21, 2024 17:53 — forked from lydell/README.md
Find unused Elm record fields

Find unused Elm record fields

This script finds some unused record fields (but not all).

First run npm ci, and then:

git grep -l '^main =' | xargs elm make --output elm.js && node find-unused-record-fields.js < elm.js
@7hoenix
7hoenix / elm-learning-trail-2020-03-10.md
Last active March 11, 2020 02:19
Elm Learning Trail (2020-03-10). . . Gratefully Copied From 8th Light Internal
@7hoenix
7hoenix / Makefile
Created February 21, 2020 19:41 — forked from paytonrules/Makefile
A Cheat Sheet for a bunch of the stuff we did I my Makefile talk
# Basic Syntax
target: dependency dependency2 ...
command1
command2
# Note that those must BE TABs
# Setting variables
variable_name = "blah"
Chapter 1 exercises:
Combinators:
1. yes
2. no
3. yes
4. yes
5. no
@7hoenix
7hoenix / main.rs
Created March 10, 2018 21:23
rusoto S3
extern crate rusoto_core;
extern crate rusoto_s3;
extern crate simple_logger;
use rusoto_core::Region;
use rusoto_s3::{S3, S3Client};
fn main() {
simple_logger::init().unwrap();
### Keybase proof
I hereby claim:
* I am 7hoenix on github.
* I am jphoenx (https://keybase.io/jphoenx) on keybase.
* I have a public key ASBIWBgcbJXAkVCfMlyWtFlxZG-NcmNbHvHKHGuP23Ya8Qo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jphoenx on github.
  • I am jphoenx (https://keybase.io/jphoenx) on keybase.
  • I have a public key whose fingerprint is C8D2 6BBD 72E4 4216 C111 2372 1291 7F6A 488F 1D0C

To claim this, I am signing this object:

(defn minimax [board func]
(if (game-is-over? board)
(score board func)
(let [available (find-available board)
states (map #(make-move board player %))]
(reduce func states))))
(defn maxi [board]
(apply max (map minimax board mini)))
function countdown (num) {
if (num >= 0) { return console.log (0) };
return console.log(countdown (num - 1));
}
countdown (5);
function countdown (num) {
console.log(num)
if (num <= 0) { return num };
return countdown (num - 1);
}
countdown (5);