Based on https://gist.github.com/jchunky/3444833
class QuizAnswer < ActiveRecord::Base
...
def user_answer_collection
return [] if !user_answer
user_answer.split(",")
end
Based on https://gist.github.com/jchunky/3444833
class QuizAnswer < ActiveRecord::Base
...
def user_answer_collection
return [] if !user_answer
user_answer.split(",")
end
description "Xvfb X Server" | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [016] | |
exec /usr/bin/Xvfb :99 -screen 0 1024x768x24 |
The stock version that comes with OS X 10.10 DP1 is know to to suffer following errors:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- psych (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:5:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
defmodule Config do | |
@moduledoc """ | |
This module handles fetching values from the config with some additional niceties | |
""" | |
@doc """ | |
Fetches a value from the config, or from the environment if {:system, "VAR"} | |
is provided. | |
An optional default value can be provided if desired. |
defmodule Crypto do | |
def md5(s) do | |
list_to_binary(Enum.map(bitstring_to_list(:crypto.md5(s)), fn(x) -> integer_to_binary(x, 16) end)) | |
end | |
end |
const semver = require('semver'); | |
const browserslist = require('browserslist'); | |
const polyFillService = require('polyfill-service'); | |
function browserVersionMatches(browsersListVersion, polyFillServiceVersion) | |
{ | |
// Do some quick and easy checks first | |
if (browsersListVersion === polyFillServiceVersion) return true; | |
if (polyFillServiceVersion === '*') return true; | |
if (browsersListVersion === 'all') return true; |
source 'https://rubygems.org' | |
gem 'rake' | |
gem 'lotus-router' | |
gem 'lotus-controller' | |
gem 'lotus-view' | |
group :test do | |
gem 'rspec' | |
gem 'capybara' |
Many of us spend many hours of our days using their terminal. Plus, we all have different tastes when it comes to color schemes. That's why the ability to change the color scheme of a terminal is one of its more important featuresl. Throughout this tutorial, I'll teach you how you can change the looks of your terminal, step by step.
This tutorial is aimed at elementary OS users, but it also works for any Ubuntu user. Start by installing dconf-tools:
sudo apt-get install dconf-tools
Secondly, you need to decide which theme you're going to apply. You can find dozens of terminal color schemes online, you can even design your own using this web application. Design the color scheme, hit "Get Scheme" and choose "Terminator". You'll get a raw text file with a background color, a foreground color and a palette. Those strings define your color scheme. In this tutorial, I'll post an
CodeRunner is a nifty little app for OSX that allows you to play around with test code with minimal fuss. Here are some instructions for setting it up to build Rust code.