apt-get install nginx apache2-utils rsync
Add a password : sudo htpasswd /etc/htpasswd
apt-get install motion
bind: 0.0.0.0 | |
port: 8125 | |
root: tmp/statsd | |
redis: | |
host: 127.0.0.1 | |
port: 6379 | |
retentions: | |
1: 600 | |
10: 360 | |
60: 10080 # 1 week |
#!/bin/bash | |
# create ~motion/cam/ on your server, | |
# create a local ssh key, connect once to make sure it works | |
# set the following line in motion.conf | |
# on_movie_end /home/motion/copy-file.sh %f | |
# on_picture_save /home/motion/copy-file.sh %f | |
# movie_filename %Y/%m/%d/%v-%H%M%S | |
# target_dir /home/motion/ | |
86141.335295] mmc0: Timeout waiting for hardware interrupt - cmd25. | |
[86141.338742] mmcblk0: error -110 transferring data, sector 1699824, nr 80, cmd response 0x900, card status 0xc00 | |
[86141.339611] end_request: I/O error, dev mmcblk0, sector 1699832 | |
[86141.339670] end_request: I/O error, dev mmcblk0, sector 1699840 | |
[86141.339692] end_request: I/O error, dev mmcblk0, sector 1699848 | |
[86141.339711] end_request: I/O error, dev mmcblk0, sector 1699856 | |
[86141.339756] end_request: I/O error, dev mmcblk0, sector 1699864 | |
[86141.339778] end_request: I/O error, dev mmcblk0, sector 1699872 | |
[86141.339795] end_request: I/O error, dev mmcblk0, sector 1699880 | |
[86141.339812] end_request: I/O error, dev mmcblk0, sector 1699888 |
#!/bin/bash | |
# Simple script to kill stale resque workers | |
# Adam St. John <astjohn@gmail.com> | |
# 2011-06-24 | |
# Timeout set to 10 minutes | |
TIMEOUT=300 | |
# 21028 resque-1.16.1: Forked 17674 at 1308879414 |
apt-show-versions | grep 'No available' |
4.2.10: 1 0.01% | |
3.2.1: 1 0.01% | |
4.2: 1 0.01% | |
3.2.2: 4 0.05% | |
4.0.1: 4 0.05% | |
4.0: 4 0.05% | |
4.3: 4 0.05% | |
4.3.2: 5 0.06% | |
4.3.1: 11 0.13% | |
5.0: 12 0.14% |
class PushMailerInterceptor | |
def self.delivering_email(message) | |
StatStore.incr("push_mailer".to_sym) | |
message.destinations.each do |recipient| | |
if EmailSetting.find_by_email(recipient) | |
message.perform_deliveries = false | |
end | |
end | |
end | |
end |
Subject: Fabien, how could I have done better? | |
Hello Fabien, | |
You've decided to leave the Sunrise club. We miss you already. | |
I would like to know if there is anything I can do to convince you to come back. Tell me about the one thing that you wish we would change. | |
Your feedback is very valuable to me and the team and I am looking forward to hear from you. |
Models: | |
class Push < ActiveRecord::Base | |
belongs_to :user | |
end | |
class User < ActiveRecord::Base | |
has_many :pushes | |
end |