This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you don't have pv - install it for the import progress bar | |
| brew install pv | |
| # For relatively fast export as executable SQL, use: | |
| # For partial export you can set list of exported tables, for example -t products -t stores | |
| PGPASSWORD="<database_password>" pg_dump --format=plain --clean --no-owner --no-privileges --if-exists <db_name> -h <hostname> -U <username> -f <filename.sql> | |
| # To watch on file size (if you know expected DB size), you can use | |
| wc "ls -lAh *.sql" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule MessageOperations do | |
| @doc """ | |
| Spawns process with possibility to wait for messages. | |
| Returns pid. | |
| ## Examples | |
| mb_pid = MessageOperations.start_mock_messagebox | |
| send(mb_pid, :something) | |
| MessageOperations.flush_messages(mb_pid) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # cat /var/log/rabbitmq/startup_* | |
| Crash dump was written to: erl_crash.dump | |
| Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}) | |
| {error_logger,{{2013,4,25},{6,59,17}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,epmd_close}},[{inet_tcp_dist,listen,1,[{file,"inet_tcp_dist.erl"},{line,70}]},{net_kernel,start_protos,4,[{file,"net_kernel.erl"},{line,1314}]},{net_kernel,start_protos,3,[{file,"net_kernel.erl"},{line,1307}]},{net_kernel,init_node,2,[{file,"net_kernel.erl"},{line,1197}]},{net_kernel,init,1,[{file,"net_kernel.erl"},{line,357}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}]} | |
| {error_logger,{{2013,4,25},{6,59,17}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| attrib -R -A -H -S /s /d * | |
| del /f "Removable Disk (1GB).lnk" | |
| del /f "Removable Disk (2GB).lnk" | |
| del /f "Removable Disk (4GB).lnk" | |
| del /f "Removable Disk (8GB).lnk" | |
| del /f autorun.inf | |
| del /f /p *.init | |
| del /f desktop.ini | |
| del /f Thumbs.db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| server_name <sitename>; | |
| root /home/<user>/app/current/public; | |
| try_files $uri/index.html $uri.html $uri @app; | |
| location @app { | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_redirect off; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rails_env = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'production' | |
| rails_root = ENV['RAILS_PATH'] || File.dirname(File.expand_path(File.dirname(__FILE__))) | |
| pid_path = File.join(rails_root, 'tmp', 'pids', 'unicorn.pid') | |
| old_pid = File.join(rails_root, 'tmp', 'pids', 'unicorn.pid.oldbin') | |
| out_path = File.join(rails_root, 'log', 'unicorn') | |
| working_directory rails_root | |
| worker_processes (rails_env == 'production' ? 3 : 2) | |
| preload_app true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :unicorn do | |
| def rails_root | |
| ENV['RAILS_PATH'] || rails_root | |
| end | |
| def unicorn_pid | |
| File.join(rails_root, 'tmp', 'pids', 'unicorn.pid') | |
| end | |
| def unicorn_config | |
| File.join(rails_root, 'config', 'unicorn.rb') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CSS: | |
| Find What: | |
| url\(../images/([^\)]+)\) | |
| Replace with: | |
| url(<%= asset_path '$1' %>) |