Kitteh
This commit is contained in:
		
							parent
							
								
									7c52436ae0
								
							
						
					
					
						commit
						7c3cbe867f
					
				
							
								
								
									
										4
									
								
								Rakefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Rakefile
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| APP_FILE = 'pastemaster.rb' | APP_FILE = 'pastekitten.rb' | ||||||
| APP_CLASS = 'Pastemaster' | APP_CLASS = 'Pastekitten' | ||||||
| 
 | 
 | ||||||
| require 'sinatra/assetpack/rake' | require 'sinatra/assetpack/rake' | ||||||
|  | |||||||
| @ -30,6 +30,19 @@ h1 | |||||||
|   text-transform uppercase |   text-transform uppercase | ||||||
|   color #ccc |   color #ccc | ||||||
| 
 | 
 | ||||||
|  |   &:before | ||||||
|  |     display block | ||||||
|  |     content '' | ||||||
|  |     background url(../img/kitten_70.png) | ||||||
|  |     width 43px | ||||||
|  |     height 35px | ||||||
|  |     background-size 43px 35px | ||||||
|  |     background-position top left | ||||||
|  |     background-repeat no-repeat | ||||||
|  |     margin -10px 0 0 5px | ||||||
|  |     float right | ||||||
|  |     opacity .5 | ||||||
|  | 
 | ||||||
| .linenos | .linenos | ||||||
|   padding-right .5em |   padding-right .5em | ||||||
|   color #ccc |   color #ccc | ||||||
							
								
								
									
										
											BIN
										
									
								
								app/assets/img/kitten_70.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/assets/img/kitten_70.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 6.2 KiB | 
| @ -1,14 +1,19 @@ | |||||||
| doctype html | doctype html | ||||||
| html | html | ||||||
|   head |   head | ||||||
|     title Pastemaster |     title Paste Kitten | ||||||
|     link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css" |     link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css" | ||||||
|     == css :application |     == css :application | ||||||
|   body |   body | ||||||
|     a href="/" |     a href="/" | ||||||
|       h1 |       h1 | ||||||
|         strong Paste |         strong Paste | ||||||
|         | master |         | Kitten | ||||||
|  | 
 | ||||||
|  |     /! | ||||||
|  |       Kitten image author is SkyProductions | ||||||
|  |       http://skyproductions.deviantart.com/art/Kitten-line-art-252996232 | ||||||
|  | 
 | ||||||
|     .container== yield |     .container== yield | ||||||
|     script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js" |     script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js" | ||||||
|     == js :application |     == js :application | ||||||
|  | |||||||
| @ -17,4 +17,4 @@ html | |||||||
|       |   color: #444444; |       |   color: #444444; | ||||||
|       | } |       | } | ||||||
|   body |   body | ||||||
|     | 403 Forbidden |     | 403 Purrbidden | ||||||
|  | |||||||
| @ -1,3 +1,3 @@ | |||||||
| require File.expand_path('../pastemaster', __FILE__) | require File.expand_path('../pastekitten', __FILE__) | ||||||
| 
 | 
 | ||||||
| run Pastemaster.new | run Pastekitten.new | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ require 'mina/rbenv' | |||||||
| 
 | 
 | ||||||
| set :user, 'www' | set :user, 'www' | ||||||
| set :domain, '5.9.98.165' | set :domain, '5.9.98.165' | ||||||
| set :deploy_to, '/home/www/apps/pastemaster' | set :deploy_to, '/home/www/apps/pastekitten' | ||||||
| set :repository, 'git@github.com:localhots/pastemaster.git' | set :repository, 'git@github.com:localhots/pastekitten.git' | ||||||
| set :branch, 'master' | set :branch, 'master' | ||||||
| set :rbenv_path, '/usr/local/rbenv' | set :rbenv_path, '/usr/local/rbenv' | ||||||
| set :app_path, ->{ "#{deploy_to}/#{current_path}" } | set :app_path, ->{ "#{deploy_to}/#{current_path}" } | ||||||
| @ -55,7 +55,7 @@ namespace :assetpack do | |||||||
| end | end | ||||||
| 
 | 
 | ||||||
| namespace :unicorn do | namespace :unicorn do | ||||||
|   set :unicorn_pid, "/tmp/pastemaster.unicorn.pid" |   set :unicorn_pid, "/tmp/pastekitten.unicorn.pid" | ||||||
| 
 | 
 | ||||||
|   desc "Start unicorn" |   desc "Start unicorn" | ||||||
|   task :start => :environment do |   task :start => :environment do | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| protocol: postgres | protocol: postgres | ||||||
| username: pastemaster | username: pastekitten | ||||||
| password: pastemaster | password: pastekitten | ||||||
| host: localhost | host: localhost | ||||||
| port: 5432 | port: 5432 | ||||||
| database: pastemaster | database: pastekitten | ||||||
|  | |||||||
| @ -1,11 +1,11 @@ | |||||||
| upstream pastemaster_unicorns { | upstream pastekitten_unicorns { | ||||||
|   server unix:/tmp/pastemaster.unicorn.sock fail_timeout=0; |   server unix:/tmp/pastekitten.unicorn.sock fail_timeout=0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| server { | server { | ||||||
|   listen pm.localhots.xxx:80; |   listen pm.localhots.xxx:80; | ||||||
|   server_name pm.localhots.xxx; |   server_name pm.localhots.xxx; | ||||||
|   root /home/www/apps/pastemaster/current; |   root /home/www/apps/pastekitten/current; | ||||||
|   client_max_body_size 10M; |   client_max_body_size 10M; | ||||||
|   keepalive_timeout 5; |   keepalive_timeout 5; | ||||||
| 
 | 
 | ||||||
| @ -22,6 +22,6 @@ server { | |||||||
|     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||||
|     proxy_set_header Host $http_host; |     proxy_set_header Host $http_host; | ||||||
|     proxy_redirect off; |     proxy_redirect off; | ||||||
|     proxy_pass http://pastemaster_unicorns; |     proxy_pass http://pastekitten_unicorns; | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,9 +1,9 @@ | |||||||
| working_directory '/home/www/apps/pastemaster/current' | working_directory '/home/www/apps/pastekitten/current' | ||||||
| worker_processes 2 | worker_processes 2 | ||||||
| timeout 10 | timeout 10 | ||||||
| 
 | 
 | ||||||
| listen '/tmp/pastemaster.unicorn.sock', backlog: 64 | listen '/tmp/pastekitten.unicorn.sock', backlog: 64 | ||||||
| pid '/tmp/pastemaster.unicorn.pid' | pid '/tmp/pastekitten.unicorn.pid' | ||||||
| 
 | 
 | ||||||
| stderr_path '/dev/null' | stderr_path '/dev/null' | ||||||
| stdout_path '/dev/null' | stdout_path '/dev/null' | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ require 'config/initializers/configuration' | |||||||
| require 'config/initializers/database' | require 'config/initializers/database' | ||||||
| require 'lib/error_pages' | require 'lib/error_pages' | ||||||
| 
 | 
 | ||||||
| class Pastemaster < Sinatra::Application | class Pastekitten < Sinatra::Application | ||||||
|   set :root, File.dirname(__FILE__) |   set :root, File.dirname(__FILE__) | ||||||
|   set :server, 'unicorn' |   set :server, 'unicorn' | ||||||
|   set :public_folder, 'public' |   set :public_folder, 'public' | ||||||
| @ -35,14 +35,15 @@ class Pastemaster < Sinatra::Application | |||||||
|   assets do |   assets do | ||||||
|     serve '/assets/js', from: 'app/assets/js' |     serve '/assets/js', from: 'app/assets/js' | ||||||
|     serve '/assets/css', from: 'app/assets/css' |     serve '/assets/css', from: 'app/assets/css' | ||||||
|  |     serve '/assets/img', from: 'app/assets/img' | ||||||
| 
 | 
 | ||||||
|     css :application, '/assets/css/application.css', [ |     css :application, '/assets/css/application.css', [ | ||||||
|       '/assets/css/pastemaster.css', |       '/assets/css/pastekitten.css', | ||||||
|       '/assets/css/dropdown.css', |       '/assets/css/dropdown.css', | ||||||
|       '/assets/css/pygments_solarized_modified.css' |       '/assets/css/pygments_solarized_modified.css' | ||||||
|     ] |     ] | ||||||
|     js :application, '/assets/js/application.js', [ |     js :application, '/assets/js/application.js', [ | ||||||
|       '/assets/js/pastemaster.js', |       '/assets/js/pastekitten.js', | ||||||
|       '/assets/js/dropdown.js' |       '/assets/js/dropdown.js' | ||||||
|     ] |     ] | ||||||
| 
 | 
 | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user