Top Shelf Web Design & Development ♥ We are creative thinkers with a focus on modern web production. We use the latest tools available to help build your brand's digital presence.
A Pen by Nicholas Cerminara on CodePen.
rake db:migrate VERSION=0 RAILS_ENV=test; rake db:migrate RAILS_ENV=test; | |
# If you do not have RVM v1.11 installed, you may have to use 'bundle exec' infront of your rake commands, like so: | |
# bundle exec rake db:migrate VERSION=0 RAILS_ENV=test; bundle exec rake db:migrate RAILS_ENV=test; |
# http://kellishaver.tumblr.com/post/54922678930/quick-tip-canonical-urls | |
# Building a site that handles link submissions? Check submitted links for a canonical URL tag to avoid duplicates. | |
# Similarly, if you’re a content creator and you’re not using the canonical URL tag, you should be! | |
def canonical(url) | |
begin | |
page = Nokogiri::HTML(open(url)) | |
page.css("link[rel=canonical]")[0]["href"] | |
rescue | |
url |
$ rvm get stable | |
$ rvm requirements | |
$ rvm use 2.0.0@<gemset_name> --create --default | |
ruby-2.0.0-p353 is not installed. | |
To install do: 'rvm install ruby-2.0.0-p353' | |
$ gem install rails | |
$ rails new <project_name> --skip-test-unit |
Top Shelf Web Design & Development ♥ We are creative thinkers with a focus on modern web production. We use the latest tools available to help build your brand's digital presence.
A Pen by Nicholas Cerminara on CodePen.
var Appointment = Backbone.Model.extend({ | |
defaults: { | |
title: 'Checkup' | |
} | |
}); | |
# Or cause the defaults to get evaluated every time a new instance is created | |
var Appointment = Backbone.Model.extend({ | |
defaults: function() { | |
return { |
<?php | |
# Install Guzzle by running `composer require guzzlehttp/guzzle` | |
Route::get('github/{username}', function ($username) { | |
$client = new GuzzleHttp\Client(); | |
$request = $client->get("https://api.github.com/users/{$username}"); | |
echo $request->getBody(); | |
}); |
PROBLEM:
Was trying to brew install opentsdb
from CLI, but got:
Errno::EACCES: Permission denied - /Users/stuarthannig/.irb-history
initialize at org/jruby/RubyFile.java:478
open at org/jruby/RubyIO.java:1135
(root) at /Users/stuarthannig/.rvm/scripts/irbrc.rb:32
call at org/jruby/RubyProc.java:270