Skip to content

Instantly share code, notes, and snippets.

# page 2
=begin
Station>>computePart: aPart
^self multiplyPartTimesRate: aPart
Station>>multiplyPartTimesRate: aPart
^Part
amount: aPart amount * self rate
date: aPart date
=end
@steveklabnik
steveklabnik / ember_template.rb
Last active June 4, 2016 16:57
A template for making Ember apps with Rails.
run "sed --in-place '/turbolinks/d' Gemfile"
run "sed --in-place '/turbolinks/d' app/assets/javascripts/application.js"
run "sed --in-place '/coffee/d' Gemfile"
run "sed --in-place '/jbuilder/d' Gemfile"
run "sed --in-place 's/, \"data-turbolinks-track\" => true//' app/views/layouts/application.html.erb"
gem 'active_model_serializers'
@juliepagano
juliepagano / 101_off_limits.md
Last active December 16, 2020 09:37
101 conversations I generally don't want to have...

This list now exists over at http://juliepagano.com/blog/2013/11/02/101-off-limits/ and will be updated there.

I keep saying that impromptu, unwanted feminism 101 discussions are exhausting and not a good use of my resources. Then people ask what I mean by 101, so I'm starting to make a list. This list will change over time - I recommend checking back.

I highly recommend checking this list before engaging with me about feminism if you're new to it. It'll save both of us a lot of time and frustration.

Diversity in tech

Women aren't equally represented in tech because biology

Nope. This argument is bad and the science does not support it. Unfortunately, every time you say this out loud, you are contributing to cultural problems that do decrease the number of women in tech.

/*
decimal_sep: character used as deciaml separtor, it defaults to '.' when omitted
thousands_sep: char used as thousands separator, it defaults to ',' when omitted
*/
Number.prototype.toMoney = function(decimals, decimal_sep, thousands_sep)
{
var n = this,
c = isNaN(decimals) ? 2 : Math.abs(decimals), //if decimal is zero we must take it, it means user does not want to show any decimal
d = decimal_sep || '.', //if no decimal separator is passed we use the dot as default decimal separator (we MUST use a decimal separator)