Skip to content

Instantly share code, notes, and snippets.

@jyr
jyr / install-go-to-with-bash-script.md
Created May 22, 2018 14:40 — forked from d2s/install-go-to-with-bash-script.md
Installing Go with command line

Install Go language with a Bash script

Another alternative to installing Go is to use a simple Bash script. It will download and install Go language under of your own user account.

Note that a system-wide installation might be better for some things (for example, better protected from accidental modifications etc.), but this was a bit simpler to setup.

For this example, we are using:

@jyr
jyr / Dockerfile
Created December 3, 2017 15:39 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
attachments: parent_id, asset_id
domain_names: organisation_id
event_memberships: user_id, event_id
events: editor_id
group_actions: user_id, group_id
groups: user_id
icons: parent_id
invitations: sender_id
legacy_actions: item_upon_id
news_items: author_id
@jyr
jyr / gist:3eaccaec28ec2a7f8cf4
Created March 8, 2016 04:46 — forked from anonymous/gist:9388472
Summing up contextual influence on systems architecture
1. Monolithic applications and architectures can vary in their monolithness. This is an under-specified description.
2. Microservice applications and architectures can vary in their microness. This is an under-specified description.
3. Microservices and monolithic architectures have both benefits and disadvantages.
4. Organizations will exploit those benefits while working around any weaknesses.
5. Success of the business is a large influence on the exploitation of benefits and implementation and costs of workarounds.
6. All benefits and work arounds are context-sensitive. Meaning that they are both technically and socially constructed by the organization that navigates them.
7. Path dependency is a thing. History matters and manifests in these architectural decisions and evolution in an organization.
8. Patterns exist to inform practice, not dictate it. Zealous adherence to an architectural pattern brings peril when it is to the exclusion of cultural context in actual practice.
9. Architectural patterns w

Keybase proof

I hereby claim:

  • I am jyr on github.
  • I am jyr (https://keybase.io/jyr) on keybase.
  • I have a public key whose fingerprint is 5467 E976 FC72 D1BC 3ADA 8045 3ABE B6ED 20E2 AE96

To claim this, I am signing this object:

@jyr
jyr / gist:7630871620ca6752d817
Last active August 29, 2015 14:04
lauch postgresql via osx
launchctl unload /opt/boxen/homebrew/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist
launchctl load /opt/boxen/homebrew/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist
launchctl load /usr/local/Cellar/postgresql/9.3.5_1/homebrew.mxcl.postgresql.plist
@jyr
jyr / gist:7876902
Created December 9, 2013 18:01
spree
At this point, if you are using spree_auth_devise you will need to change this line in config/initializers/spree.rb:
Spree.user_class = "Spree::LegacyUser"
To this:
Spree.user_class = "Spree::User"
@jyr
jyr / autossh.sh
Created November 16, 2013 06:31
Autossh
autossh -M 2200 -p22 -N -D 9999 user@domain.com
Version: ImageMagick 6.8.6-3 2013-09-15 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib freetype jng jpeg png tiff xml zlib

Recently, I had a staging database on Heroku that was running on the Ronin database (which was originally the lowest-sized DB you could get at Heroku). Since they added two new options, Crane and Kappa, we wanted to take advantage of the cost savings. Here's how you can migrate your Ronin DB to Crane (or any other plan).

The old database was named BROWN while the new one is CRIMSON. You can determine this by running:

heroku pg:info --app myapp-staging
  1. Add Crane database

     heroku addons:add heroku-postgresql:crane --app myapp-staging
    

heroku pg:wait --app myapp-staging