Skip to content

Instantly share code, notes, and snippets.

View asanger's full-sized avatar
💭
Currently Architecting with CQRS + ES

Alec Sanger asanger

💭
Currently Architecting with CQRS + ES
  • SlyTrunk
  • Clarkston, MI
View GitHub Profile
@asanger
asanger / petstore3.json
Created March 13, 2019 16:47
petstore OpenAPI3 file
{
"openapi": "3.0.0",
"servers": [
{
"url": "http://petstore.swagger.io/v2"
}
],
"x-origin": [
{
"url": "http://petstore.swagger.io/v2/swagger.json",
@asanger
asanger / credentials.json
Created October 2, 2017 19:40
loading json file and base64 decoding a value
{
"username": "testuser",
"password": "bXlwYXNzd29yZA=="
}
@asanger
asanger / gist:4e6a93362a172dfa2e62
Created December 10, 2014 15:25
List dirty model changes in a human readable format
# Probably not the ideal way to handle this, but it should output the changes made to a model after it's been updated.
# If you want to grab the changes before the model is saved, change '.previous_changes' to '.changes'
# Hash contains a hash of changes in this following format:
# {attribute_name_1 => [old_value, new_value], attribute_name_2 => [old_value, new_value]}
change_hash = your_changed_object.previous_changes
# If we don't want to include the "updated_at" (or some other attributes), delete their keys from the hash
change_hash.delete("updated_at")
Open Xcode > Preferences > Downloads, click Command Line Tools, then click Install.
Run ```$ sudo vim /etc/paths``` and move ```/usr/local/bin``` to the top line.
```bash
$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
$ brew install git
$ brew install mysql
$ sudo mysql_install_db --verbose --user=root --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
@asanger
asanger / dabblet.css
Created September 12, 2012 15:26
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.select-list {
width:130px;
}
.select-list > option {
font-size:large;
@asanger
asanger / dabblet.css
Created September 11, 2012 14:23
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;