As configured in my dotfiles.
start new:
tmux
start new with session name:
Feature: Advanced scripting | |
As a My script writer | |
I want to nest tasks inside of questions | |
So I can respond dynamically to the user's needs | |
@aruba_interactive | |
Scenario: Nesting questions | |
Given a file named "yes.template" with: | |
""" |
As configured in my dotfiles.
start new:
tmux
start new with session name:
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
protected | |
def current_user | |
@current_user ||= User.find_by_id(session[:user_id]) | |
end | |
def signed_in? |
Bootstrap 3.0 gives you access to the awesome icon set icon set by these dudes but it's not obvious for a Rails newbie like myself to get it all working together nicely
RAILS_ROOT/vendor/assets/stylesheet/bootstrap-glyphicons.css
/dist/fonts
from the Bootstrap 3.0 download to a new folder in your Rails app RAILS_ROOT/vendor/assets/fonts
config.assets.paths << Rails.root.join("vendor","assets", "fonts")
to application.rb
after the line that has class Application < Rails::Application
.bootstrap-glyphicons.css
modify the the `url# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
Add the utf8_sanitizer.rb to your Rails 3.2 project in app/middleware. Instead of removing the invalid request characters and continuing the request (as some gems do) it returns a 400 error.
Add the following line to your config/application.rb:
config.middleware.use 'Utf8Sanitizer'
If you only need it in production add to config/environments/production.rb. This can be without quotes:
config.middleware.use Utf8Sanitizer
1. Build GraphQL server using `express-graphql` package. | |
2. Configure `schema.js` file. | |
3. Query for data. |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
import { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js'; | |
const wrapper = mountWithIntl( | |
<CustomComponent /> | |
); | |
expect(wrapper.state('foo')).to.equal('bar'); // OK | |
expect(wrapper.text()).to.equal('Hello World!'); // OK |
Estimated time: 10 minutes