install rabbitMQ:
brew install rabbitmq
brew services start rabbitmq
web interface
http://localhost:15672/
#Model | |
expect(@user).to have(1).error_on(:username) # Checks whether there is an error in username | |
expect(@user.errors[:username]).to include("can't be blank") # check for the error message | |
#Rendering | |
expect(response).to render_template(:index) | |
#Redirecting | |
expect(response).to redirect_to(movies_path) |
# OTRS REST API docs | |
https://otrs.perl-services.de/docs/otrs/rel-3_3/kernel_genericinterface_operation_ticket_ticketcreate.html |
install rabbitMQ:
brew install rabbitmq
brew services start rabbitmq
web interface
http://localhost:15672/
# Fix SSH auth socket location so agent forwarding works with screen. | |
if test "$SSH_AUTH_SOCK" ; then | |
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock | |
fi | |
# Taken from the sshd(8) manpage. | |
if read proto cookie && [ -n "$DISPLAY" ]; then | |
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then | |
# X11UseLocalhost=yes | |
echo add unix:`echo $DISPLAY | |
# Predictable SSH authentication socket location. | |
SOCK="/tmp/ssh-agent-$USER-screen" | |
if test $SSH_AUTH_SOCK && [ $SSH_AUTH_SOCK != $SOCK ] | |
then | |
rm -f /tmp/ssh-agent-$USER-screen | |
ln -sf $SSH_AUTH_SOCK $SOCK | |
export SSH_AUTH_SOCK=$SOCK | |
fi zsh [unix] 100% 95/95☰ : 1 |
# GNU Screen - main configuration file | |
# All other .screenrc files will source this file to inherit settings. | |
# Author: Christian Wills - [email protected] | |
shell -$SHELL | |
# Allow bold colors - necessary for some reason | |
attrcolor b ".I" | |
# Tell screen how to set colors. AB = background, AF=foreground | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' |
If you have any sort of administrative interface on your web site, you can easily imagine an intruder gaining access and mucking about. How do you know the extent of the damage? Adding an audit log to your app is one quick solution. An audit log should record a few things:
Using the Rails framework, this is as simple as adding a before_action
to your admin controllers. Here’s a basic version that I’m using in production.
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
require 'mina/rvm' # for rvm support. (http://rvm.io) | |
# Basic settings: | |
# domain - The hostname to SSH to. | |
# deploy_to - Path to deploy into. | |
# repository - Git repo to clone from. (needed by mina/git) |
class HashMap | |
def initialize | |
@prizes = [35, 25, 20, 15, 5] | |
@participations = [ | |
Participation.new(10), | |
Participation.new(10), | |
Participation.new(10), | |
Participation.new(6), | |
Participation.new(4), | |
Participation.new(4) |
I hereby claim:
To claim this, I am signing this object: