Skip to content

Instantly share code, notes, and snippets.

View cakekindel's full-sized avatar
🍰

Orion Kindel cakekindel

🍰
View GitHub Profile
abstract class Repo<T> {
constructor(private db: DbDriver, private repo: string) {}
public get(id: string): T {
return this.db[this.repo].get(id);
}
public delete(id: string): void {
return this.db[this.repo].delete(id);
}
@cakekindel
cakekindel / ENV.md
Last active October 29, 2020 00:11

StrongmindApp CICD Workflow

Stages

  • Development
    • Open pull-requests are deployed here for manual & automated testing
  • Staging
    • Pre-production stage for testing changes before green-lighting to users
  • Production
  • Fully-exercised build is rolled out to mobile stores & prod web-app

GREAT

These are the zips that we would definitely be interested in living in

  • 85254
  • 85028
  • 85253
  • 85018
  • 85250
  • 85251
struct Number(i32);
const SUITCASE_LEN: Number = Number(55);
const SUITCASE_HGT: Number = Number(40);
enum Shape {
Circle { diameter: Number },
Rect { length: Number, height: Number },
Triangle { base: Number, height: Number },
}
type Circle = { diameter: number };
type Rectangle = { length: number, height: number };
type Triangle = { base: number, height: number };
type Shape =
| Circle
| Triangle
| Rectangle;
const suitcase = {
import {strike, match, otherwise} from '@matchbook/ts';
type Coin =
| 'penny'
| 'nickel'
| 'dime'
| 'quarter';
const getValue = (c: Coin): number => strike(
c,
type Coin =
| 'penny'
| 'nickel'
| 'dime'
| 'quarter';
function getValue(coin: Coin): number {
switch(coin) {
case 'penny': return 0.01;
case 'nickel': return 0.05;
abstract class Coin
{
public float GetValue()
{
return this switch
{
Penny => 0.01,
Nickel => 0.05,
Dime => 0.10,
Quarter => 0.25,
enum Coin {
Penny,
Nickel,
Dime,
Quarter,
}
impl Coin {
pub fn get_value(&self) -> f16 {
use Coin::*;
type Coin =
| Penny
| Nickel
| Dime
| Quarter
let getValue c =
match c with
| Penny -> 0.01
| Nickel -> 0.05