- install ruby 2.4.0
- install bundler
git clone [email protected]:michelson/dante-stories.git
cd dante-stories
bundle install
This file contains 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
git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -rg | head -10 |
Inspired by komarserjio/notejam
Notejam is a web application which allows user to sign up/in/out and create/view/edit/delete notes. Notes are grouped in pads. There will 2 part of the application. First is the backend which is provide HTTP API for the second part: the frontend which handles the UI.
This file contains 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
class ApplicationController < ActionController::Base | |
if ENV["DISALLOW_ALL_WEB_CRAWLERS"].present? | |
http_basic_authenticate_with( | |
name: ENV.fetch("BASIC_AUTH_USERNAME"), | |
password: ENV.fetch("BASIC_AUTH_PASSWORD"), | |
) | |
end | |
end |
This file contains 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 :deploy do | |
desc "reload the database with seed data" | |
task :seed do | |
on roles(:all) do | |
within current_path do | |
execute :bundle, :exec, 'rails', 'db:seed', 'RAILS_ENV=production' | |
end | |
end | |
end | |
end |
This file contains 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 { | |
root /path/to/webapp/public; | |
index index.php index.html index.htm; | |
server_name webapp.local; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} |
This file contains 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
; Start a new pool named 'www'. | |
; the variable $pool can we used in any directive and will be replaced by the | |
; pool name ('www' here) | |
[www] | |
; Per pool prefix | |
; It only applies on the following directives: | |
; - 'slowlog' | |
; - 'listen' (unixsocket) | |
; - 'chroot' |
This file contains 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
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_check_update = false | |
config.vm.network "forwarded_port", guest: 22, host: 2222, id: 'ssh' | |
config.vm.network "private_network", ip: "10.10.0.2" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "1024" | |
end | |
config.vm.provision "shell", path: "script.sh" | |
end |
This file contains 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 { | |
listen 80; | |
server_name ums.harukaeduapps.com; | |
# Tell Nginx and Passenger where your app's 'public' directory is | |
root /home/deploy/htdocs/ums/current/public; | |
# Turn on Passenger | |
passenger_enabled on; |
This file contains 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
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' | |
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' | |
local ruby_version='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}' | |
local git_branch='$(git_prompt_info)%{$reset_color%}' | |
local php_version='%{$fg[blue]%}‹$(phpbrew_current_php_version | sed -e "s/[-a-z][^0-9]*//g")›%{$reset_color%}' | |
PROMPT="╭─${user_host} ${current_dir} ${ruby_version} ${php_version} ${git_branch} | |
╰─%B$%b " |
NewerOlder