Skip to content

Instantly share code, notes, and snippets.

View masonhensley's full-sized avatar
🤠
Workin at Caris

Mason Hensley masonhensley

🤠
Workin at Caris
View GitHub Profile
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@tooky
tooky / bumbailiff
Created September 18, 2017 14:53
Bumbailiff - A script for ageing TODO comments in code.
#!/usr/bin/env bash
#
# The bumbailiff allows the team to take up a small amount of technical debt
# (TODOs in the code) for a limited period. After that period the script fails.
#
# It will find // TODO in .js or .jsx files, and # TODO in .feature files.
#
# For example, if the allowed period for all the TODOs is 14 days.
# * It's OK to have 1 TODO that is 13 days old
# * It's OK to have 3 TODOs that are 4 days old
@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luciddreamz
luciddreamz / keycloak.sh
Last active February 27, 2024 05:26 — forked from paoloantinori/keycloak.sh
Keycloak Admin API Rest Example: Get User
#!/bin/bash
# requires https://stedolan.github.io/jq/download/
# config
KEYCLOAK_URL=http://localhost:8080/auth
KEYCLOAK_REALM=realm
KEYCLOAK_CLIENT_ID=clientId
KEYCLOAK_CLIENT_SECRET=clientSecret
USER_ID=userId

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@sandcastle
sandcastle / aurora_cluster.tf
Created March 25, 2016 09:44
Creates a AWS RDS Aurora Cluster with Terraform
########################
## Variables
########################
variable "environment_name" {
description = "The name of the environment"
}
variable "vpc_id" {
with
dau as (
-- This part of the query can be pretty much anything.
-- The only requirement is that it have three columns:
-- dt, user_id, inc_amt
-- Where dt is a date and user_id is some unique identifier for a user.
-- Each dt-user_id pair should be unique in this table.
-- inc_amt represents the amount of value that this user created on dt.
-- The most common case is
-- inc_amt = incremental revenue from the user on dt
@codespore
codespore / boost_template.rb
Last active May 5, 2020 03:45
Rails application template
# Rails 4 Application Template
# Usage: rails new [app_name] -m [boost_template.rb] -d postgresql
# Remove normal files we don't want
remove_file "README.rdoc"
remove_file "public/index.html"
remove_file "app/assets/images/rails.png"
# Copy database.yml to sample
inside "config" do
class Ticket < ActiveRecord::Base
belongs_to :grouper
belongs_to :user
validate :user_cant_be_blacklisted, on: :confirmation
validate :user_cant_double_book, on: :confirmation
validate :grouper_cant_be_full, on: :confirmation
validate :grouper_cant_have_occurred, on: :confirmation
@thomasv314
thomasv314 / application_controller.rb
Created January 15, 2014 23:46
An example of how we check to see if the current visitor is allowed to see the beta running in production.
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :check_beta, :except => [ :beta ]
def beta
render :layout => "blank"
end