Skip to content

Instantly share code, notes, and snippets.

View amorphid's full-sized avatar

Michael Pope amorphid

  • Digital Turbine
  • San Francisco, CA
View GitHub Profile
@amorphid
amorphid / elixir_setup.md
Created November 28, 2015 19:37
Setting up Elixir 1.1.1 on Mac OS 10.10.5

Setting up Elixir 1.1.1 on Mac OS 10.10.5

These are the steps I used to install Elixir on a Macbook Pro on Nov. 28, 2015.

If you find this Gist, and would like help setting up Elixir, feel free to email me at [email protected].

Prerequisites

You'll need the following installed before setting up Elixir:

@amorphid
amorphid / gist:25f24bf10abc3c16c6a2
Created September 11, 2015 00:43
hey look, a public gist
woot!
# Android
export ANDROID_HOME="/Users/mikepope/Applications/android-sdk-macosx"
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home"
@amorphid
amorphid / 2014-11-26-i-left-my-pants-in-san-francisco.md
Last active August 29, 2015 14:10
I Left My Pants In San Franciso

November 26, 2014

Goodbye San Francisco. I've been with you over 10 years, and now I am leaving. During our time together, I have, in no particular order:

  • worked as a life insurance agent
  • suffered 2 broken arms in a bicycle accident
  • started a an insurance business
  • closed an insurance business
  • started a technical recruiting business
  • sold a technical recruiting business
development:
adapter: postgresql
encoding: unicode
database: eliostrom_development
pool: 5
username: amorphid
password:
test:
adapter: postgresql
/usr/local/bin # put me at the top!
/usr/bin
/bin
/usr/sbin
/sbin
class Foo
attr_reader :bar
def initialize(args = {})
@bar = args.fetch(:bar)
unless bar.nil?
do_something
do_something_else
end
<h1>Posts</h1>
<ul class="posts">
<% @posts.each do |post| %>
<li>
<%= link_to "", post_votes_path(post, value: 1), class: "icon-chevron-up upvote-" %>
<br />
<span class="score">
<%= post.score %>
</span>
# from controller
respond_to do |format|
format.html { redirect_to :back }
format.json { render json: @voteable.score } # score is an integer
end
# from application.js
$(document).ready(function() {
@amorphid
amorphid / gist:6322728
Last active December 21, 2015 14:49
From blog entry "Displaying formatted HTML in Rails"
<img src="http://i.imgur.com/v7q2NBN.jpg" title="Hosted by
imgur.com" height="350" width="350" style="float:left;margin: 0px 30px 30px 0px;" />
<h1 style="margin: 0px 0px 30px 0px;">Displaying formatted HTML in Rails</h1>
<h2 style="margin: 0px 0px 30px 0px;">The problem</h2>
<p style="margin: 0px 0px 30px 0px;">Third party blogging platforms drive me bonkers. <a href="http://en.wikipedia.org/wiki/Tumblr" target="_blank">Tumblr</a> requires you to be a CSS wizard in order to customize anything. <a href="http://en.wikipedia.org/wiki/Blogger_(service)" target="_blank">Blogger</a> is pretty good, it still hosts my old <a href="http://captainrecruiter.blogspot.com" target="_blank">Captain Recruiter blog</a>, but it's not designed to be anything more than a standalone blog and I don't like that limitation. After a few attempts to use it, I still don't understand <a href="http://en.wikipedia.org/wiki/Wordpress" target="_blank">Wordpress</a>. So given my I-want-a-blog-built-just-for-me itch, I decided to wri