Nginx, Conditioned Proxy_set_header Assignment

Sometimes it’s needed to assign some proxy header depending on some variable value. But proxy_set_header does not work with “if” cause (at least didn’t work with nginx 1.4.1). So the following construction won’t work:

Some Notes Regarding Rsyslog and Remote Logging for Rails Apps

We use SyslogLogger gem in order to forward rails application log to system log.

in rails Gemfile:

group :production do
  gem "SyslogLogger", "~> 2.0", :require => 'syslog/logger'
end

in config/environments/production.rb

config.logger = Syslog::Logger.new "rails_application_name" 

The problem was that logs actually were forwarded to syslog, messages and user.log and sent to remote server and written to syslog, messages and user.log there. I was asked to make things DRY(ier).

ATmega8 Blinking LED and Interrupts

Several days ago I decided to clean up drawers in my desk at home and, of course, found several artifacts: old Univercity notes, Parker pen I was presented by my sister several years ago and some ATmega8A AVR microcontrollers.

I had several vacation days and caught a cold. So I couldn’t help but installed Atmel Studio and CodeVisionAVR to play with LEDs a bit.

Skype + Pulseaudio 4.0 in Debian Jessie/testing Buzz

After the recent system upgrade of my Debian x64 home desktop I’ve noticed Skype started to make creepy buzzzzzzz sound or no sound at all. The issue is caused by the new version of pulseaudio, 4.0. The workaround is to set environment variable PULSE_LATENCY_MSEC=30: $ PULSE_LATENCY_MSEC=30 skype &>/dev/null & Here is a thread devoted to this issue.