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

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

@jyr
jyr / vim.rb
Last active December 18, 2015 00:09 — forked from mgrouchy/vim.rb
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'https://vim.googlecode.com/hg/', :revision => '6c318419e331'
version '7.3.515'
def features; %w(tiny small normal big huge) end
def interp; %w(lua mzscheme perl python python3 tcl ruby) end
Monquiro.Views ||= {}
class Monquiro.Views.GoogleMapView extends Backbone.View
# A Backbone View always holds a div element in his @el variables.
id: 'map' # Sets the id of the @el div
initialize: () ->
$(@el).css('width','100%') # You can access the @el div with jQuery even if it's not yet on the document.
$(@el).css('height','600px')
@map = null
@jyr
jyr / psqlfix.txt
Last active April 25, 2024 21:29
Change postgres default template0 to UTF8 encoding
http://blog.desgrange.net/2012/06/05/caldav-carddav-debian-davical-ios-ical.html
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
@jyr
jyr / Questions
Created July 13, 2011 07:25
Magma Rails Give-away
Day Job: Core Developer of MNPP - http://getmnpp.org/
Open Source contribution (if any): I write MNPP, I wrote a little contribution to drupal.
Tell me about your experience with Ruby/Rails: I want be Jedi Knight of Ruby!
How do you use GitHub: I like write code and share usefull for others in any language
Favorite luchador(es): Doctor Wagner ("En mi casa y con mi gente se me respeta !!!")