Skip to content

Instantly share code, notes, and snippets.

@robertothais
robertothais / lisp.rb
Last active December 23, 2017 18:35
Pairing Interview Submission for RC
class Lisp
def initialize(program)
@program = program
end
def tokenize
matches = {
parens: '[()]',
string: '".*?(?<!\\\)"',
atom: '\S+?(?:(?=[()])|(?=\s)|(?=$))'

Keybase proof

I hereby claim:

  • I am robertothais on github.
  • I am robertothais (https://keybase.io/robertothais) on keybase.
  • I have a public key ASBvnRRLOQr1OP5TokXZyl3DFJS0ve-tPMjqqUivumSujQo

To claim this, I am signing this object:

+-----+------------------------------------------------------------------------------------------------+-------------+
| id | title | key |
+-----+------------------------------------------------------------------------------------------------+-------------+
| 45 | Foo Fighters - Everlong [HQ] | PgCwtG80qXU |
| 52 | The Strokes - Hard to Explain (HQ) | 0aZrtbtjPdY |
| 54 | Jive Bunny and The Mastermixers - That's What I Like | I1qMmuLed9E |
| 56 | Lykke Li - Get Some | -TTPGAy5H_E |
| 57 | Hey Juliet - LMNT | le8vixtpX6Q |
| 58 | Santogold - You'll Find A Way
LXVI. All through his life Michael Angelo has been very abstemious, taking food more from necessity than from pleasure, especially when at work, at which time, for the most part, he has been content with a piece of bread, which he munched whilst he laboured. But latterly he has lived more regularly, his advanced age requiring it.
From Ascanio Condivi's Life of Michelangelo
http://www.gutenberg.org/files/19332/19332-h/19332-h.html
WHEN Parties in a State are violent, he offered a wonderful Contrivance to reconcile them. The Method is this. You take an Hundred Leaders of each Party; you dispose them into Couples of such whose Heads are nearest of a Size; then let two nice Operators saw off the Occiput of each Couple at the same Time, in such a Manner that the Brain may be equally divided. Let the Occiputs thus cut off be interchanged, applying each to the Head of his opposite Party-man. It seems indeed to be a Work that requireth some Exactness; but the Professor assured us, that if it were dextrously performed, the Cure would be infallible. For he argued thus; that the two half Brains being left to debate the Matter between themselves within the Space of one Scull, would soon come to a good Understanding, and produce that Moderation as well as Regularity of Thinking, so much to be wished for in the Heads of those, who imagine they came into the World only to watch and govern its Motion: And as to the Difference of Brains in Quantity or
Pod::Spec.new do |s|
s.name = 'XMPPFramework'
s.version = '3.5'
s.license = 'BSD'
s.summary = 'An XMPP Framework in Objective-C for the Mac / iOS development community.'
s.homepage = 'https://github.com/robbiehanson/XMPPFramework'
s.author = { 'Robbie Hanson' => '[email protected]' }
s.source = { :git => 'https://github.com/robbiehanson/XMPPFramework.git', :tag => '3.5' }
s.description = 'XMPPFramework provides a core implementation of RFC-3920 (the xmpp standard), along with
@robertothais
robertothais / gist:4043600
Created November 9, 2012 03:56 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
The Shout XMPP server
Preparing ejabberd for test... [ done ]
when the receiver is online
should send an XMPP message
should not send a request to the push service
when the receiver is in the background
behaves like the receiver is online
should send an XMPP message
should not send a request to the push service
when the receiver is offline
<div class="search_section" data-section-name="tags">
<div class="heading">
Tags
<% rn_tooltip "Tags" do -%>
Use this filter to restrict your search to artists for which you have applied the selected tags.
<% end -%>
</div>
<div class="content">
<%= f.select 'tags', [], {}, :multiple => true, 'data-placeholder' => 'Choose tags', 'data-bind' =>
'options: all_tags, optionsText: \'name\', optionsValue: \'value\', selectedOptions: \'selected_tags\'' %>
<script type="text/javascript">
var options = {
elemId: 'venue_submissions_filters',
allGenres:<%= Artist::GENRES.to_json %>,
allTags: <%= submission_tag_options.map{|name,v|{:name => name, :value => v}}.to_json %>,
webServer: '<%= WEB_SERVER %>',
widgetServer: '<%= widget_server %>',
pageSize: <%= ArtistSearch::PAGE_SIZE %>,
maxPages: <%= ArtistSearch::MAX_PAGE %>,
venueId: '<%= @venue.id %>',