Skip to content

Instantly share code, notes, and snippets.

@lengarvey
lengarvey / array_spec.rb
Created January 31, 2014 04:31
How do subject one liners work?
describe Array do
describe "when first created" do
# Rather than:
# it "should be empty" do
# subject.should be_empty
# end
it { should be_empty }
# or
it { is_expected.to be_empty }
@lengarvey
lengarvey / speaker_mentoring.md
Last active August 29, 2015 13:56
Resources of people doing speaker mentoring

Speaker Mentoring people

Hi Toby, Lucy and Greg. If ya'll are going to setup some sort of speaker/mentoring thingy in Sydney perhaps you can get some help from people who have done it before:

All of this was from @cczona who is the "I" in the last bullet point.

  • strong tradition of speaker mentorship on @devchix. It's how I got started; as well as long list of others who speak constantly now

  • the mailing list for @SpeakUp_io does mentoring of new speakers. Low activity list with ppls incredibly generous when asked.

@lengarvey
lengarvey / things_to_do_for_diversity.md
Last active August 29, 2015 13:56
Ruby Australia diversity

Some actions we can take to help improve diversity

  1. Revise our code of conduct. Some aspects of it are problematic for people (myself included). I'll raise an issue on this shortly.
  2. Develop an action plan to help organisers of events deal with incidents. See: http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Responding_to_reports
  3. Get some members of our community to take a training course on how to deal with incidents properly. Something like: http://www.nswrapecrisis.com.au/Training.aspx could be appropriate. This will help in dealing with any incidents properly. It will also mean that people will have more trust that we will respond to incidents properly.
  4. Announce the names of contact persons/duty officers before events such as RailsCamp and RubyConf.
  5. Keep working on bulding mentoring programs for new developers along the lines of RailsGirls/Installfest/DevelopmentHub. We need Australian-local equivalents of RailsBridge, DevChix, TransHack etc. Some of this needs to be owned by
@lengarvey
lengarvey / example.html.erb
Created March 1, 2014 04:24
example html and erb
<html>
<body>
<h1>This is html</h1>
<% "inside the <% and %> is ruby code" %>
<%= "when you see <%= it means 'please output the result of this ruby into the html'" %>
</html>
@lengarvey
lengarvey / roro_in_a_pub.md
Created March 16, 2014 21:22
RoRoSyd not in a pub?

Given that many(most?) jobs filled are done so via personal/community recommendations, it follows that teams are therefore built from the pool of people who attend events like RoRoSyd or are friends of those people. This creates a monoculture of people who enjoy the type of activity that RoRoSyd is within our workplaces.

To fix this either RoRoSyd must become more diverse, or companies must spend more money locating, recruiting and training more diverse applications. The aspect of this we as a community have control over is RoRoSyd.

RoRoSyd is currently a social event/drinkup instead of a professional networking event. Personally I enjoy RoRoSyd in it's current form, but I think it should evolve and part of that means losing the image of a drinkup. Therefore lets leave the pub.

There's no doubt in my mind that our community is more intimidating to newbies and minorities because it's in a pub. We should work to be less intimidating, both to grow our community and to help improve the diversity of our teams a

I have issues/opinions/feelings regarding: http://pollenizer.com/australias-top-female-programmers which were too numerous to put in a tweet.

  1. Using the word "female" is exclusionary and overly clinical. Trans-women may find its usage to be exclusionary since the word "female" denotes a biological category while "woman" does not.
  2. There are 46 women on this list of 50 women. I believe there were 47 but one asked to be removed.
  3. I've no doubt they are fantastically skilled programmers, but why are these 46 better than the others not on this list?
  4. This article is written as if we should be celebrating the fact there are these 46 women developers diversifying the programming community in Australia. If anything we should be lamenting that even after accepting nominations there were only 47 developers listed.

On the other hand it's awesome to recognise individual developers for being great. If this had been framed as: "Here's some awesome women developers tangentally related to the startup community" th

class Foo
def initialize(opts = {})
@opts = opts
extract_options
end
attr_reader :bar
private
@lengarvey
lengarvey / buildbox_error.txt
Created March 21, 2014 06:30
buildbox error
2014/03/21 06:29:45 Started buildbox-agent `lens-macbook-test` (version 0.1)
2014/03/21 06:29:55 Starting job 18d0a5c9-fd1f-4fb5-845c-ca0c496d2215
2014/03/21 06:29:56 Running script `bootstrap.sh` from inside /home/vagrant/.buildbox
2014/03/21 06:29:57 io.Copy failed with error: read /dev/ptmx: input/output error
2014/03/21 06:29:58 Finished job 18d0a5c9-fd1f-4fb5-845c-ca0c496d2215
@lengarvey
lengarvey / flowdock_css_tagged_items_bug_and_fix.md
Last active August 29, 2015 13:57
Flowdock CSS bug and fix

The bug

In Flowdock (the app) it automatically puts a border around "tag" items. It looks like:

Imgur

But when you increase the size of the text in the window using Command+ it will break this:

Imgur

This bug does not occur in the web application, only in the Flowdock app on the Mac (which is really just a webview).

@lengarvey
lengarvey / attr_accessible.md
Created April 3, 2014 18:22
selectively enabling protected_attributes/attr_accessible

In config/application.rb

config.active_record.whitelist_attributes = false

In each model where you want to whitelist your attributes:

class Foo &lt; ActiveRecord::Base