Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| test "not allow to update state after account reconciliation" do | |
| # get fixture | |
| account = accounts(:fresh) | |
| # submit and expect no errors | |
| post :waive_fee, :id => account.id | |
| assert_nil flash[:error] | |
| post :add_fee, :id => account.id | |
| assert_nil flash[:error] |
| # | |
| # | |
| # | |
| # | |
| # | |
| require 'rubygems' | |
| require 'win32ole' | |
| require 'csv' | |
| mdb_file="c:/dtolj/ruby_projects/phone.accdb" |
| # Check if remote file exists | |
| def remote_file_exists?(full_path) | |
| 'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip | |
| end | |
| # Check if process is running | |
| def remote_process_exists?(pid_file) | |
| capture("ps -p $(cat #{pid_file}) ; true").strip.split("\n").size == 2 | |
| end |
| set :shared_children, shared_children << 'tmp/sockets' | |
| namespace :deploy do | |
| desc "Start the application" | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false | |
| end | |
| desc "Stop the application" | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
| # | |
| # Save this into your `lib/mongoid/paperclip.rb` file | |
| # | |
| # | |
| require "paperclip" | |
| module Paperclip | |
| class << self |
| upstream myapp { | |
| server unix:///myapp/tmp/puma.sock; | |
| } | |
| server { | |
| listen 80; | |
| server_name myapp.com; | |
| # ~2 seconds is often enough for most folks to parse HTML/CSS and | |
| # retrieve needed images/icons/frames, connections are cheap in |
| # First, make sure that you have the most recent rvm. Several bugs with 2.0.0-preview1 | |
| # have recently been fixed. | |
| # | |
| # Second, the openssl that comes with MacOS is too old for Ruby 2.0. You need to install | |
| # a newer one with homebrew or the rvm pkg command. | |
| # Option 1, with homebrew openssl: | |
| brew update | |
| brew install openssl |
| # lib/tasks/deploy.rake | |
| namespace :deploy do | |
| desc 'Deploy to staging environment' | |
| task :staging do | |
| exec 'mina deploy -f config/deploy/staging.rb' | |
| end | |
| end |
| #!/bin/bash | |
| UP=$(pgrep mysql | wc -l); | |
| if [ "$UP" -ne 1 ]; | |
| then | |
| echo "MySQL is down."; | |
| sudo service mysql start | |
| else | |
| echo "All is well."; | |
| fi |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.