Skip to content

Instantly share code, notes, and snippets.

@Ezku
Ezku / Justfile
Created January 19, 2022 18:22
Applications/raycast-script-commands/Justfile
#!/usr/bin/env just
default:
just -l
# Update this git repository
update:
git fetch --depth 1 && git reset --hard origin/master
# Find available commands
@Ezku
Ezku / Justfile
Created September 13, 2021 08:12
raycast-script-commands/Justfile
#!/usr/bin/env just
default:
just -l
# Update this git repository
update:
git fetch --depth 1 && git reset --hard origin/master
# Find available commands
@Ezku
Ezku / D20.scala
Last active February 21, 2019 10:30
Probability distribution for outcome of rolling multiple dice
import cats.Monoid
import cats.implicits._
import scala.collection.immutable.Stream
import com.cra.figaro.language.{ Constant, Element, Apply, Chain, Atomic }
import com.cra.figaro.algorithm.factored.{ VariableElimination }
import com.cra.figaro.algorithm.sampling.Importance
import com.cra.figaro.algorithm.{ ProbQueryAlgorithm }
import com.cra.figaro.library.atomic.discrete.FromRange
@Ezku
Ezku / SketchSystems.spec
Last active September 14, 2018 13:25 — forked from valscion/SketchSystems.spec
Closed*
Closed*
report anomaly -> Opened
Opened
close -> Closed
Ilmoita muu tilanne*
Initial*
Asiakkaalle on vastattu toisessa keskustelussa -> Report specific anomaly
Tilaisuus on jo raportoitu toisessa keskustelussa -> Report specific anomaly
@Ezku
Ezku / tagged.flowspec.js
Last active June 5, 2018 11:44
Opaque type projection does not maintain exactness
/* @flow */
import {
type Tagged, // eslint-disable-line import/named
tagged
} from './tagged';
// I can create tagged values...
const taggedString: Tagged<string> = tagged('asdf');
// ...and those values can be used as the type that was provided as the argument to `Tagged`:
@Ezku
Ezku / gist:fb2c70f2687887f868bb1042823f6ce1
Created April 26, 2018 11:47
gem install hypothesis-specs -v '0.0.9'
circleci@bf4cc848203d:~/venuu$ rustc --version
rustc 1.25.0 (84203cac6 2018-03-25)
circleci@bf4cc848203d:~/venuu$ cargo --version
cargo 0.26.0 (41480f5cc 2018-02-26)
circleci@bf4cc848203d:~/venuu$ gem install hypothesis-specs -v '0.0.9'
Fetching: thor-0.20.0.gem (100%)
Successfully installed thor-0.20.0
Fetching: tomlrb-1.2.6.gem (100%)
Successfully installed tomlrb-1.2.6
Fetching: helix_runtime-0.7.3.gem (100%)
# frozen_string_literal: true
require 'hypothesis'
require_dependency 'nuugeo'
RSpec.describe Nuugeo::Viewport::Union do
include Hypothesis
include Hypothesis::Possibilities
def union(left, right)
described_class.call(left, right)
@Ezku
Ezku / combinators.js
Created February 20, 2018 13:53 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
@Ezku
Ezku / .profile
Last active October 11, 2017 12:31 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@Ezku
Ezku / .profile
Created October 11, 2017 12:31 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else