Skip to content

Instantly share code, notes, and snippets.

View mjc-gh's full-sized avatar
🎯
Open Sourcing

Michael Coyne mjc-gh

🎯
Open Sourcing
View GitHub Profile
@mjc-gh
mjc-gh / docker-compose.yml
Last active February 28, 2023 16:48 — forked from nicoavila/docker-compose.yml
Docker Compose file for a MySQL 5.7 container
version: '3.3'
services:
database:
image: mysql:5.7
container_name: mysql
restart: always
environment:
MYSQL_DATABASE: 'ThriveFantasy'
MYSQL_USER: 'tf'
MYSQL_PASSWORD: 'password'
#!/usr/bin/env python
import itertools, copy
HOUSE_VALUE = {
'stark': 42,
'greyjoy': 20,
'martel': 25,
'baratheon': 40,
'lannister': 35,
'tyrell': 28
@mjc-gh
mjc-gh / benchmark.rb
Last active June 4, 2017 06:49 — forked from tonytonyjan/benchmark.rb
How fast is `reverse!` technique.
# conversation: https://github.com/rack/rack/commit/734a00c5f4bb46e9a5e6e2677d89a2f285dcc185
#
# user system total real
# reverse: 0.030000 0.010000 0.040000 ( 0.046804)
# join: 0.090000 0.000000 0.090000 ( 0.092356)
# regexp: 0.080000 0.000000 0.080000 ( 0.087152)
# slice 0.010000 0.000000 0.010000 ( 0.004146)
require 'benchmark'