Open the postgresql.conf config file:
$> mate /usr/local/var/postgres/postgresql.conf
Uncomment the line with 'log_destination' and set it to 'syslog'
log_destination = 'syslog'
Open the syslog config:
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
# Redis configuration file example | |
# By default Redis does not run as a daemon. Use 'yes' if you need it. | |
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. | |
daemonize yes | |
# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default. | |
# You can specify a custom pid file location here. | |
pidfile /var/run/redis.pid |
Open the postgresql.conf config file:
$> mate /usr/local/var/postgres/postgresql.conf
Uncomment the line with 'log_destination' and set it to 'syslog'
log_destination = 'syslog'
Open the syslog config:
@test_deploy @javascript # @test_deploy tag setup in cucumber.yml profile, @javascript runs in capybara-webkit | |
Feature: Smoke Test | |
In order to test that the application is deployed | |
As a caring developer | |
I want to check a few features of the site | |
Background: | |
Given we are in the deploy environment | |
Scenario: Logging in and checking basic navigation |
Here's an interesting refactoring challenge.
Refactor the tangle.c program described at http://axiom-developer.org/axiom-website/litprog.html with the goal of making it more readable and maintainable.
Some suggested guidelines and constraints. Of course, you can do
class Symbol | |
def enter(rider) | |
(!self).call rider | |
end | |
def !@ | |
-> subject do | |
method = subject.method(self) | |
return method.call if method.arity.zero? | |
method.to_proc.curry |
// Construct a table with table[i] as the length of the longest prefix of the substring 0..i | |
function longestPrefix(str) { | |
// create a table of size equal to the length of `str` | |
// table[i] will store the prefix of the longest prefix of the substring str[0..i] | |
var table = new Array(str.length); | |
var maxPrefix = 0; | |
// the longest prefix of the substring str[0] has length | |
table[0] = 0; |
Picking the right architecture = Picking the right battles + Managing trade-offs