Skip to content

Instantly share code, notes, and snippets.

View bostonaholic's full-sized avatar
🏕️

Matthew Boston bostonaholic

🏕️
View GitHub Profile
@stevenharman
stevenharman / gemfresh
Last active December 29, 2023 16:05
gemfresh: A handy script for determining the freshness of dependencies in a Ruby code base. Leverages bundler and libyear-bundler.
#!/usr/bin/env bash
# shellcheck disable=SC2059
set -euo pipefail
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
CLEAR_LINE='\r\033[K'
@eddiewebb
eddiewebb / count.sh
Last active August 7, 2018 00:00
GitHub Contributor count/list by org
GH_TOKEN="1234"
ORG_NAME="some-org"
curl -H "Authorization: token ${GH_TOKEN}" https://api.github.com/orgs/${ORG_NAME}/repos | jq -r '.[].url' > /tmp/repos
rm /tmp/repos 2>/dev/null
while read REPO;do
curl -H "Authorization: token ${GH_TOKEN}" ${REPO}/contributors 2>/dev/null | jq -r '.[].login' >> /tmp/users
done < /tmp/repos
cons = fn (a, b) -> fn x -> x.(a, b) end end
car = fn (p) -> p.(fn (q, _) -> q end) end
cdr = fn (p) -> p.(fn (_, q) -> q end) end
each = fn (list, func) ->
iter = fn (list, func, next) ->
(fn (a, nil) -> func.(a)
(a, b) -> func.(a); next.(b, func, next)
end).(car.(list), cdr.(list))
end
iter.(list, func, iter)
@pjstadig
pjstadig / core.clj
Created March 6, 2017 16:28
In Clojure you can fetch items from a map three different ways. Which should you use when?
(ns maps.core)
;; In Clojure you can fetch items from a map three different ways. Which should
;; you use when?
(= "bar" ({:foo "bar"} :foo)) ; map as function
(= "bar" (:foo {:foo "bar"})) ; key as function
(= "bar" (get {:foo "bar"} :foo)) ; `get` as function
;; <INCIDENTALLY>
@jadeallenx
jadeallenx / tour.md
Last active September 18, 2016 00:56
Post Strange Loop BBQ tour

Post Strange Loop BBQ Tour

Like [last year][1] I am planning to visit many of the BBQ joints in Saint Louis, most of which are not in walking distance of the conference venues. Unlike in 2015, the [Q in the Lou BBQ][6] festival will not conveniently overlap dates with the Strange Loop conference- Q in the Lou will occur the weekend following Strange Loop.

Itinerary

This is the itinerary. We will leave Union Station in groups using UberXLs or cabs around 10:30 am. Meet outside the main doors at Union Station Double Tree on Market Street.

@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@SzymonPobiega
SzymonPobiega / gist:5220595
Last active April 25, 2024 17:19
DDD/CQRS/ES/Architecture videos

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@bostonaholic
bostonaholic / user.clj
Created October 29, 2011 03:53
Include clojure 1.3.0 libraries for emacs clojure-jack-in
;; ~/.lein/user.clj
(if (>= (.compareTo (clojure-version) "1.3.0") 0)
(do (use 'clojure.repl)
(use 'clojure.java.javadoc)
(use 'clojure.reflect)))
@njvitto
njvitto / deploy.rake
Created April 11, 2010 16:56 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]