Skip to content

Instantly share code, notes, and snippets.

  1. Corporations don’t like you. The executive editor of a major news publication took me out to lunch to get advice on how to expand their website traffic. But before I could talk he started complaining to me: “Our top writers keep putting their twitter names in their posts and then when they get more followers they start asking for raises.”

“What’s the problem?” I said. “Don’t you want writers that are popular and well-respected?”

When I say a “major news publication” I am talking MAJOR.

He said, “no, we want to be about the news. We don’t want anyone to be an individual star.”

In other words, his main job was to destroy the career aspirations of his most talented people, the people who swore their loyalty to him, the people who worked 90 hours a week for him. If they only worked 30 hours a week and were slightly more mediocre he would’ve been happy. But he doesn’t like you. He wants you to stay in the hole and he will throw you a meal every once in awhile in exchange for your excrement. If anyone is a r

require 'active_support/string_inquirer'
module Farts
module Environment
def env
# only want to set this value if it doesn't already have one
file_name = '/Users/aclarke/tmp/environment'
# don't even bother to set this if it's already been set (||=)
@@_env_file ||= File.exists?(file_name) ? File.read(file_name).strip : "development"
# read contents of file if it exists and hasn't already been read and it exists
@@_file_contents ||= (File.read(file_name).strip if File.exists?(file_name))
-- or --
@@_file_contensts ||= File.exists?(file_name) ? File.read(file_name).strip : nil
str1 = "foo"
str2 = "bar"
str3 = "#{str1}#{str2}"
puts str3
=> "foobar"
var_1 = 'hi'
var_2 = 'hello'
name = "steve"
<<<<< BLAH
puts "#{var_1} #{var_2}, #{name}"
>>>>> ANOTHER BRANCH

from http://www.parlouisiana.org/s3web/1002087/docs/2012_guide_to_constitutional_amendments.pdf

Under strict scrutiny, a law must pass three tests to be considered valid. The government first must prove it has a compelling interest that justifies the passage of the law. In the case of gun laws, public safety is the state’s compelling interest. Courts generally agree that public safety is a compelling interest or a valid reason for states to pass laws that might infringe on an individual’s Second Amendment rights.

The law also must be narrowly tailored to achieve the compelling interest. That is, the law may not be overly broad in its reach. For example, a law that

// just logging the output from underscore.js .each function, pulling in some json data.
var portfolio = '<% _.each(projects, function(iimage, iproject, ilink_to_more_copy, iimage_name, pproject_name, pproject_subtitle, pproject_desc, iimage_desc){ console.log("iimage:", iimage, "iproject", iproject, "ilink_to_more_copy", ilink_to_more_copy, "iimage_name",iimage_name, pproject_name, "pproject_subtitle:", pproject_subtitle, "pproject_desc", pproject_desc, "iimage_desc", iimage_desc); } ) %>';
var template = _.template(portfolio, {projects : [{"iimage":"GHI_Mothers2.jpg","iproject":"5","ilink_to_more_copy":"","iimage_name":"","iimage_desc":"GHI Physicians are the types of professionals that can do anything and go anywhere they choose in life. The Mothers Campaign captures the emotion during those once-in-a-lifetime events when their children make them prouder than they ever could have ever imagined. In this campaign, those momentous occasions happen to correspond directly with the choice they make to become p
require 'machine'
describe Machine do
before :each do
@machine = Machine.new
end
it "should initially have a state of :initial" do
@machine.state.should == :initial
end
things = [:object, :subject]
string = string.gsub(string.send(things[rand(1)], butt))