Skip to content

Instantly share code, notes, and snippets.

View donalmurtagh's full-sized avatar

Dónal Murtagh donalmurtagh

View GitHub Profile
All of TPP’s problems can be traced back to its CEO, Frank Hester. The man is deeply insecure and wants nothing more than a band of kowtowing drones to feed his ego. It’s apparent that Frank has few people to associate with outside of work and longs to make friends with his employees, though the feeling is rarely mutual. Several employees have spoken of late-night phone calls from him, which never have anything to do with actual work, but rather whatever happens to be on Frank’s mind. This alone would be a sizeable invasion of privacy, but throw in the fact that Frank is often intoxicated and/or looking to dig up dirt on whichever employee he is currently suspecting of dissent and you're looking at a CEO with absolutely no concept of what’s appropriate. Not only does Frank often make racist or sexist “jokes”, but he revels in his Trumpian filter and expects you to laugh alongside him. Failure to comply can be seen as grounds for dismissal. Virtually none of the longstanding employees engage in non-mandatory c
@donalmurtagh
donalmurtagh / gist:4ea3c35d94a212e333ecfb75c30f773e
Last active August 3, 2023 18:07
Vuetify migration gotchas
  • the v-model of VFileInput is always an array of files. In v2 this was only the case if multiple file support is enabled

  • the item-key prop of VDataTable has been renamed to item-value . The old name seems like a better description of its purpose, so the reason for this change is a mystery

  • The return-object prop of VDataTable is buggy, approach with caution

  • The custom-sort prop of VDataTable has been removed. Currently in v3 there doesn't appear to be any way to implement a sort function that has access to multiple fields. Hopefully a replacement will be made available in future versions

  • The arguments passed to a VDataTable @click:row handler have changed (edited)

@donalmurtagh
donalmurtagh / simple-blackjack.md
Last active June 9, 2020 11:55
Simple Blackjack

Introduction

Simple Blackjack is a variant of blackjack. It is a game played by a single player against a dealer. The objective of the game is to draw cards whose total is as close as possible to 21, without exceeding it (AKA "busting").

Rules

The value of a hand of Simple Blackjack is the sum of the card values where

  • The value of an Ace is 11
  • Jacks, Queens, and Kings are worth 10

We start off with the hand represented as a string such as "2H 3H 4H 5H 6H". This is pretty useless so we need to parse it into a data structure we can reason about. Something like

class PokerHand {
  
  PokerHand(String cards) {  
  }
  
 Iterable getCards() { 
@donalmurtagh
donalmurtagh / stupid-poker.md
Last active January 21, 2022 06:46
Stupid Poker

Introduction

Stupid poker is a variant of poker that removes all skill and decision-making from the game, reducing it to a simple game of chance. The rules are as follows: ​

  1. Each player is dealt 2 private cards (AKA hole cards) that only they can use
  2. 5 communal cards are dealt which may be used by every player
  3. Each player must make the best 5-card poker hand from the 7 cards available to them
  4. The winner is the player with the best hand according to the standard ranking of poker hands

Notes

@donalmurtagh
donalmurtagh / .bash_profile
Last active September 30, 2020 13:29
configure command prompt
db() {
docker exec -it c1-ark-postgres su -s /bin/sh - postgres -c "sh -c 'psql ark_dev'"
}
ssPsql() {
docker exec -it bid-event-backend_db_1 su -s /bin/sh - postgres -c "sh -c 'psql postgres'"
}
parseGitBranch() {