Skip to content

Instantly share code, notes, and snippets.

View jwo's full-sized avatar

Jesse Wolgamott jwo

View GitHub Profile
# Assign "Hello World" to a variable message
# Assign a different string to a different variable
# Assign a number to a variable
# Use string interpolation to display the number in a string
# string interpolation = "#{}"
# Make an array of your favorite movies or books or bands. Have at least 4 values.
@jwo
jwo / twitter-typeahead.css
Created February 19, 2015 17:12
Twitter Typeahead styling with Bootstrap 3. Actually works
.typeahead,
.tt-query,
.tt-hint {
width: 396px;
padding: 8px 12px;
font-size: 24px;
line-height: 30px;
border: 2px solid #ccc;
-webkit-border-radius: 8px;
@jwo
jwo / quote.rb
Created February 19, 2015 17:20
pgsearch that doesn't suck
class Quote < ActiveRecord::Base
include PgSearch
pg_search_scope :search,
:against => [:text, :author, :keywords],
:using => {
:tsearch => {
dictionary: "english",
prefix: true,
any_word: true
}
@jwo
jwo / Gemfile
Created February 19, 2015 19:37
Testing out celluloid-pmap
source 'https://rubygems.org'
ruby '2.2.0'
gem 'hitimes'
gem 'celluloid-pmap', github: 'jwo/celluloid-pmap'
@jwo
jwo / learn-rails.md
Created March 19, 2015 13:25
How to Learn Rails in 2015

I love http://codeschool.com for getting productive, Agile Web Development with Rails and Michael Hartl’s Rails Tutorial (free to read)

You’ll see links to http://railscasts.com/, but it’s fairly dated now. I’d go with https://gorails.com/ instead (some free)

If you’re looking for Ruby centric knowledge, I’d go with (my) https://rubyoffrails.com/ (free)

I also teach a Rails class at The Iron Yard — that’s 12 weeks of intensive effort (no job during the class).

I’d start with Agile Web Development, and then sample the rest to see what sticks. Supplement that with asking questions from a coach.

App.TweetComposerComponent = Ember.Component.extend({
store: Ember.inject.service(),
newTweet: function() {
return this.get('store').createRecord('tweet', {});
}
});
@jwo
jwo / ember-leaflet.js
Created March 27, 2015 17:33
ember leaflet glue
App.TileLayer = EmberLeaflet.TileLayer.extend({
tileUrl: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
options: {
attribution:
'&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
}
});
App.Marker = EmberLeaflet.MarkerLayer.extend(EmberLeaflet.PopupMixin, {
@jwo
jwo / Gemfile
Last active August 29, 2015 14:19
Wanted to send about 15 emails to people, but I didn't want to BCC people. Also I didn't want to send 15 emails bc UGH. So I used the power of ruby.
source "https://rubygems.org"
gem 'pony'
gem 'dotenv'
@jwo
jwo / day-1.rb
Last active August 29, 2015 14:20
# Assign "Hello World" to a variable message
yolo = "Hello World"
# Assign a different string to a different variable
# Assign a number to a variable
# Use string interpolation to display the number in a string
# string interpolation = "#{}"
# Assign "Hello World" to a variable message
# Assign a different string to a different variable
# Assign a number to a variable
# Use string interpolation to display the number in a string
# string interpolation = "#{}"
# Make an array of your favorite movies or books or bands. Have at least 4 values.