brew install mpd
~/.mpdconf
port "6600"
before_script: | |
- sudo apt-get install -y wkhtmltopdf | |
- "export DISPLAY=:99.0" | |
- "sh -e /etc/init.d/xvfb start" | |
env: WKHTMLTOPDF_BIN=/usr/bin/wkhtmltopdf |
cd /etc/ssl | |
openssl req -nodes -newkey rsa:2048 -keyout domain.key -out domain.csr | |
Generating a 2048 bit RSA private key | |
.................................................................................+++ | |
........................+++ | |
writing new private key to 'domain.key' | |
----- | |
You are about to be asked to enter information that will be incorporated | |
into your certificate request. |
pg_ctl -D /usr/local/var/postgres stop -s -m fast | |
launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist | |
rm ~/Library/LaunchAgents/org.postgresql.postgres.plist | |
mv /usr/local/var/postgres/ /usr/local/var/postgres-9.0.4/ | |
brew update | |
brew upgrade postgresql | |
cp /usr/local/Cellar/postgresql/9.1.3/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
Your Class:
class YourClass < ActiveRecord::Base
attr_accessor :some_date
columns_hash["some_date"] = ActiveRecord::ConnectionAdapters::Column.new("some_date", nil, "date")
end
Your View:
<%= form_for :your_class do |f| %>
For example, ignore your .rvmrc file:
git update-index --assume-unchanged .rvmrc
Find out which files will always be considered as unchanged:
git ls-files -v | grep ^[a-z]
Remove the unchanged flag:
class PaulAndRobin < RTanque::Bot::Brain | |
NAME = 'paul_and_robin' | |
include RTanque::Bot::BrainHelper | |
def tick! | |
command.speed = 1.5 | |
new_heading = if sensors.position.on_wall? | |
sensors.heading + RTanque::Heading::HALF_ANGLE | |
else | |
RTanque::Heading.rand |
import React, { PropTypes } from 'react' | |
const Todo = ({ onClick, completed, text }) => ( | |
<li | |
onClick={onClick} | |
style={{ | |
textDecoration: completed ? 'line-through' : 'none' | |
}} | |
> | |
{text} |
import React from 'react'; | |
import TestUtils from 'react/lib/ReactTestUtils'; | |
import Todo from './Todo'; | |
describe('Todo', () => { | |
let instance, li; | |
let Wrapper = React.createClass({ | |
render: function() { | |
return this.props.children; | |
} |
import { connect } from 'react-redux'; | |
import AddTodoForm from '../components/AddTodoForm' | |
import actions from '../actions'; | |
// mapDispatchToProps receives the dispatch() method and returns | |
// callback props that can be used to inject into the presentational component | |
// This means addTodo can be set as a prop when testing AddTodoForm which makes | |
// it easy to spy and check the correct actions are triggered | |
export const mapDispatchToProps = (dispatch) => ({ | |
addTodo: (value) => dispatch(actions.addTodo(value)) |