Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
module Rack | |
class Request | |
def scheme | |
if @env['HTTPS'] == 'on' | |
'https' | |
elsif @env['HTTP_X_FORWARDED_SSL'] == 'on' | |
'https' | |
elsif @env['HTTP_X_FORWARDED_PROTO'] | |
@env['HTTP_X_FORWARDED_PROTO'].split(',')[0] | |
else |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
When it comes to the Observer pattern, there are a number of related, overlapping terms used by different codebases. Off the top of my head:
Which of these do consider to be synonymous?
All links are amazon affiliate. I'm recommending you books, it's how I pay to buy my own. ;)
require 'active_support/hash_with_indifferent_access' | |
class Cart | |
include Enumerable | |
attr_writer :storage | |
def each(&blk) | |
deal_ids.each(&blk) | |
end |
Hi.
I'd like tell you about a matter that is quite personal but will result in some changes in the way I present myself and interact with the commnunity.
I am transgender.
I have known that my body did not match my internal gender since I was a very small child, but I kept those feelings hidden and did my best to make my life work with the body I was born into. The result was chronic stress, physical and psychological pain, and a severe depression that culminated in an acute crisis in October of 2012. At that time I entered psychotherapy to explore my options.
I was diagnosed with Gender Identity Disorder, the treatment for which includes psychotherapy, hormonal treatments and potentially several surgeries. I have been working with my therapist and doctors, following the Standards of Care that set out treatment guidelines for my condition.
# You will need the pygments and xclip packages | |
# This example highlights some Bash source code | |
# '-O noclasses=true' tells pygments to embed colors inline in the source | |
# the '-t text/html' option tells xclip what "target" to specify for the selection | |
pygmentize -l bash -f html -O noclasses=true mysource.sh | xclip -selection clipboard -t text/html |
[NOTE: The original version was posted in 2007 on an O'Reilly blog, but the page has been erroring out for months now. I'm copying it here because archive.org, while useful, can be slow. chromatic is a lovely person who (he thinks) probably has copyright to this piece.]
Last night, Brian Shirai unilaterally "ended" the RubySpec project, a sub-project of Rubinius (the alternative Ruby implementation which Brian was paid to work on full-time from 2007 to 2013). The blog post describing his reasons for "ending" the project led to a big discussion on Hacker News.
When a single, competing Ruby implementation tells that you its test suite is the One True Way, you should be skeptical. Charles Nutter, Ruby core committer and JRuby head honcho, spent a lot of time last night on Twitter talking to people about what this decision means. He's probably too busy and certainly too nice of a guy to write about what is a political issue in the Ruby community, so I'm going to do it on behalf of all the new or intermediate Rubyists out there that are confused by Brian's decision and what it me
tell application "Keynote" | |
tell document 1 | |
set theSlides to slides | |
repeat with s in the slides | |
tell presenter notes of s | |
set font to "Helvetica" | |
set size to 24 | |
end tell | |
end repeat | |
end tell |