View foo.rb
module Foo
private
def foo
"foo"
end
end
class Bar
extend Foo
View tidy.conf
indent: auto
indent-attributes: no
vertical-space: yes
View index.html
Drag the following link to your browser bookmark toolbar:
<a href="javascript:(function()%7BArray.from(document.querySelector('body').querySelectorAll('.blob-code')).forEach(function(el)%20%7Bvar%20matches%20%3D%20el.textContent.match(%2Frender%20partial%5C%3A%20%5B'%22%5D(%5B%5E'%5D%2B)%5B'%22%5D%2F)%3Bif%20(matches)%20%7Bvar%20originalPath%20%3D%20matches%5B1%5D%3Bvar%20pathElements%20%3D%20originalPath.split('%2F')%3Bvar%20lastElement%20%3D%20'_'%20%2B%20pathElements.pop()%3Bif%20(pathElements%5B0%5D%20%3D%3D%20'shared')%20%7BpathElements%5B0%5D%20%3D%20'..%2F..%2Fshared'%3B%7D%3BpathElements.push(lastElement)%3Bvar%20path%20%3D%20pathElements.join('%2F')%3Bconsole.log(path)%3Bvar%20url%20%3D%20new%20URL(path%2C%20document.location).toString()%3Bvar%20anchor%20%3D%20document.createElement('a')%3Banchor.setAttribute('href'%2C%20url)%3Banchor.setAttribute('title'%2C%20lastElement)%3Banchor.setAttribute('style'%2C%20'color%3A%20hotpink')%3Banchor.textContent%20%3D%20originalPath%3Bel.querySelectorAll('*').fo
View Gemfile
source 'https://rubygems.org'
gem 'minitest'
gem 'webmock'
View rendering-date-questions.md

Smart Answer Flows

Question

show.html.erb
  _content.html.erb
    _current_question.html.erb
      ::QuestionPresenter#partial_template_name
        _date_question.html.erb
          ::DateQuestionPresenter (undefined)
View handle-google-apps-invoice.js
function myFunction() {
var threads = GmailApp.search("label:inbox subject:'Google Enterprise: Your invoice is attached'");
for (var threadIndex = 0 ; threadIndex < threads.length; threadIndex++) {
var messages = threads[threadIndex].getMessages();
if (messages.length == 0) {
Logger.log('No messages found in thread.');
return;
}
var message = messages[0];
var attachments = message.getAttachments();
View install.md
jamesmead@floehopper.local:~$ sudo dd bs=1m if=/Users/jamesmead/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/disk2
pi@raspberrypi ~ $ sudo raspi-config
# Choose option 1 to "Expand Filesystem" - Ensures that all of the SD card storage is available to the OS
# Choose Finish & reboot

pi@raspberrypi ~ $ sudo apt-get update
View install.txt
# Based on https://github.com/metacollin/homebrew-gnuradio#homebrew-gnuradio and https://github.com/chleggett/homebrew-gqrx#install
$ brew update
$ brew upgrade # may be unnecessary
$ brew tap metacollin/gnuradio
$ brew install gnuradio # took 55 mins on my laptop & installed python via homebrew
$ brew install librtlsdr --HEAD # this installed b4c4e723f3656954f160b3f8df4e8804e4a46acd for me
$ brew tap chleggett/gqrx
$ brew tap chleggett/gr-osmosdr
$ pip install cheetah
View patches-for-rails-and-rack-for-argument-error-invalid-byte-sequence.rb
# Based on these Rack commits [1,2] which originated from this Rack PR [3] and
# mentioned in this Rails PR [4].
#
# [1]: https://github.com/rack/rack/commit/cc8279f4a158e51975838e6202581c3d5e33f1c4
# [2]: https://github.com/rack/rack/commit/975ccac7e56dcd765cb102016b97ef13d15feba8
# [3]: https://github.com/rack/rack/pull/713
# [4]: https://github.com/rails/rails/pull/11795
require 'rack/utils'
View passenger-lib-rack-name-error.txt
*** Exception NameError in PhusionPassenger::Rack::ApplicationSpawner (undefined method `ssl?' for class `Sinatra::Request') (process 21881, thread #<Thread:0x7f7c50c932d0>):
from /home/webhooks/app/vendor/gems/ruby/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:49
from /home/webhooks/app/vendor/gems/ruby/1.8/gems/sinatra-1.4.5/lib/sinatra.rb:1:in `require'
from /home/webhooks/app/vendor/gems/ruby/1.8/gems/sinatra-1.4.5/lib/sinatra.rb:1
from ./app.rb:5:in `require'
from ./app.rb:5
from config.ru:1:in `require'
from config.ru:1
from /usr/lib/ruby/1.8/rack/builder.rb:46:in `instance_eval'
from /usr/lib/ruby/1.8/rack/builder.rb:46:in `initialize'