- install ruby 2.4.0
- install bundler
git clone git@github.com: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
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
<?php | |
class Number | |
{ | |
function spell($number) | |
{ | |
$words = array( | |
"", "Satu", "Dua", "Tiga", "Empat", "Lima", "Enam", "Tujuh", | |
"Delapan", "Sembilan", "Sepuluh", "Sebelas" | |
); |
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
# go to your repository | |
cd my_project | |
# check your existing remote | |
git remote -v | |
# origin git@mydomain.tld:my_project.git (fetch) | |
# origin git@mydomain.tld:my_project.git (push) | |
# Add a new remote, a github.com private repository for example | |
# the --mirror flag is what's different from a simple new remote |
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
upstream php5438 { | |
server 127.0.0.1:5438; | |
} |
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 |
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
# Phillip Koebbe from Ruby on Rails suggested inserting following code between the "bootstrap" and | |
# "initialize" sections of enviroment.rb. This hack fixes the problem. | |
if Gem::VERSION >= "1.3.6" | |
module Rails | |
class GemDependency | |
def requirement | |
r = super | |
(r == Gem::Requirement.default) ? nil : r | |
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
# Taken from http://rcos.cs.rpi.edu/projects/flagship-safety/commit/converting-hex-color-rrggbb-to-kml-color-aabbggrr/ | |
# | |
# Generates a KML color given a hex color string. | |
# Converts the format from #RRGGBB to AABBGGRR. | |
# The alpha channel defaults to ff. | |
def to_kmlcolor(color="#000000", alpha = "ff") | |
alpha + color[5,3] + color[3,2] + color[1,2] | |
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
<VirtualHost *:80> | |
ServerName 10.10.0.3 | |
DocumentRoot /home/vagrant/htdocs/apad2/app/webroot | |
<Directory /home/vagrant/htdocs/apad2/app/webroot> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Require all granted | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error-apad.log |
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.
NewerOlder