>> request.url
=> "http://localhost:3000/ask-help.amp?hui=pizda"
>> request.path
=> "/ask-help.amp"
=begin | |
USAGE: ruby-rewrite -l controller_actions_keyword_args.rb -m <FILE> | |
This rewriter moves your Rails controller tests from `get action, params, session, flash` to | |
`get action, params: params, session: session, flash: flash`. | |
Which is needed if you see the following message in your Rails 5.0 tests : | |
DEPRECATION WARNING: Using positional arguments in functional tests has been deprecated, | |
in favor of keyword arguments, and will be removed in Rails 5.1. |
# `ERROR: Error installing nokogiri: | |
# ERROR: Failed to build gem native extension. | |
# | |
# current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri | |
# /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries | |
# checking if the C compiler accepts ... yes | |
# checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no | |
# Building nokogiri using system libraries. | |
# ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed. | |
# *** extconf.rb failed *** |
class InitialMigration < ActiveRecord::Migration[5.0] | |
def change | |
enable_extension "pgcrypto" unless extension_enabled?("pgcrypto") | |
end | |
end |
#!/bin/bash | |
#In early development, sometimes you've got a hand-built instance, but you also don't want to leave it up all the time | |
# We've got an m4xl instance running Spinnaker (http://spinnaker.io) but we only really need it during the day | |
# As a cost-saving measure, we shut it down overnight. However, we want it to be consistently accessible | |
# So this script is in a Jenkins job that runs every morning, | |
# starting up the instance then updating its DNS record to the new IP. | |
#If you have multiple DNS records for a single instance, | |
# you can safely run a second copy of the script with the ZONEID and RECORDSET updated appropriately. |
This gist is dedicated to all of my fellow clueless n00bs who are frightened by the combination of [RSpec][1], [Capybara][2] and [Authlogic][3].
This gist will not tell you how to install Ruby, Rails, RSpec, Capybara or Authlogic. For the most part, you can install any of these by running either:
brew install <packagename>
bundle install <packagename>
At the point in time that you reach this gist, you should have all of them installed.
Install node-repl-promised:
npm install -g repl-promised
Use the repl to list all users
$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
http://diwis.imis.athena-innovation.gr:8181/sparql xxxxx | |
http://wiktionary.dbpedia.org/sparql wiktionary.dbpedia.org | |
http://wiktionary.dbpedia.org/sparql wiktionary.dbpedia.org | |
http://webconf.rkbexplorer.com/sparql webconf | |
http://minsky.gsi.dit.upm.es/semanticwiki/index.php/Special:SPARQLEndpoint vulnerapedia | |
http://services.data.gov.uk/transport/sparql transport.data.gov.uk | |
http://services.data.gov.uk/statistics/sparql statistics.data.gov.uk | |
http://roni.rkbexplorer.com/sparql roni | |
http://foreign.rkbexplorer.com/sparql rkb-explorer-foreign | |
http://services.data.gov.uk/research/sparql research.data.gov.uk |