Skip to content

Instantly share code, notes, and snippets.

View joshrowley's full-sized avatar

Josh Rowley joshrowley

  • GitHub Staff
  • Jersey City, NJ
View GitHub Profile
defmodule Mast.Mixfile do
use Mix.Project
def project do
[
app: :mast,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
iex(15)> ExAws.EC2.describe_instances |> ExAws.request
{:ok,
%{body: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<DescribeInstancesResponse xmlns=\"http://ec2.amazonaws.com/doc/2016-11-15/\">\n <requestId>2502eedb-ad38-4d00-8457-b55241d588df</requestId>\n <reservationSet>\n <item>\n <reservationId>r-07ad339d8c7fb93e8</reservationId>\n <ownerId>246032130421</ownerId>\n <groupSet/>\n <instancesSet>\n <item>\n <instanceId>i-0df46e07bcdac8423</instanceId>\n <imageId>ami-bcdc16c6</imageId>\n <instanceState>\n <code>16</code>\n <name>running</name>\n </instanceState>\n <privateDnsName>ip-172-31-52-37.ec2.internal</privateDnsName>\n <dnsName>ec2-54-88-44-125.compute-1.amazonaws.com</dnsName>\n <reason/>\n <amiLaunchIndex>0</amiLaunchIndex>\n
@joshrowley
joshrowley / gist:9143808c950a621303c714499f1ce953
Last active October 29, 2016 16:56
Lemon Party Weekly Winners
Week 1 - Hawkins
Week 2 - Max
Week 3 - Heck
Week 4 - Dennis
Week 5 - Dennis
Week 6 - Mark
Week 7 - Staab

Confident Ruby Ch. 3 Notes

3. Collecting Input

  • "It is possible for a method to receive no input whatsoever, but such methods don't usually accomplish much."
  • "an explicit class name is an input like any other. It's information that comes from outside the method."

Indirect Inputs

  • "Any time we send a message to an object other than self in order to use its return value, we're using indirect inputs." (Time.now)
  • more levels of indirection == more fragile code
@joshrowley
joshrowley / bash-commands.md
Created September 1, 2016 19:16
BASH commands c/o @devinburnette

c/o @devinburnette

Basics

$ w

see who else is on box

$ w
14:15 up 5 days, 19:23, 7 users, load averages: 1.47 1.56 1.82
@joshrowley
joshrowley / tools.md
Last active February 13, 2016 17:37
Tools

Tools

Live as if you were to die tomorrow. Learn as if you were to live forever.

A list of the tools I like to use.

Productivity

  • Todoist
  • Google Calendar
  • IFTTT
@joshrowley
joshrowley / mac_setup.md
Last active August 29, 2015 14:15
Mac Setup

Every once in a while I get a new computer and need to set it up the way I like it. I've tried automating this before, but I've found that the amount of time and effort I invest to automate is never worth the time it saves considering I hardly ever get a new computer. So instead, I keep a checklist of things to install and configure every time I get a new Mac:

Apps

  • Dropbox
  • 1Password
  • Alfred w/ Powerpack
  • Slack
  • Cloudup https://cloudup.com/dashboard
  • Divvy: set up Command + Shift + Space shortcut, and full, left, right, and o p shortcuts. Make a startup item.

Encore

Give your Github issues a second life by reopening them when a resolving commit is merged into the staging branch of your project.

Models

Commit

  • sha
@joshrowley
joshrowley / pageview_by_browser.rb
Last active December 17, 2015 02:49
Parse Google Analytics Pageviews by Browser
require 'csv'
results = Hash.new 0
CSV.foreach('data.csv') { |row| results[row[1]] += 1 }
puts results
# Git status bash prompt
#
# In addition to printing the current working directory, this prompt will
# show a number of things if you are in a git repository:
# - The current branch you are in
# - Whether there are untracked files in the repository (there will be an
# asterisk after the branch nome if there are)
# - Whether there are any unmerged/unstaged/staged changes or if the directory
# is clean. See below for the colors that will be used, and change them if
# you'd like.