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
# in config/application.rb | |
config.generators do |g| | |
g.test_framework :rspec, fixture_replacement: :factory_girl | |
g.fixture false | |
g.view_specs false | |
g.helper_specs false | |
g.controller_specs false | |
g.routing_specs false | |
g.factory_girl false |
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
# in spec/spec_helper | |
require 'database_cleaner' | |
# ... | |
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.strategy = :transaction |
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
source 'https://rubygems.org' | |
gem 'rails', '4.0.2' | |
# db | |
gem 'sqlite3' | |
# css | |
gem 'sass-rails', '~> 4.0.0' | |
gem 'uglifier', '>= 1.3.0' |
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
source 'https://rubygems.org' | |
gem 'rails', '4.0.2' | |
# db | |
gem 'sqlite3', group: %i{development test} | |
#gem 'pg', group: :production # for heroku | |
# css | |
gem 'sass-rails', '~> 4.0.0' |
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
#!/usr/bin/env bash | |
# ask from install for xcode | |
if ! pkgutil --pkg-info=com.apple.pkg.CLTools_Executables >/dev/null; then | |
echo "Choisir \"Installer\" à droite puis attendre la fin de l'installation" | |
xcode-select --install | |
echo | |
read -p "Click to continue when xcode command line tools have been installed..." | |
echo | |
fi |
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
FROM ubuntu:trusty | |
RUN apt-get update | |
# basic build tools | |
RUN apt-get install -y build-essential | |
# Ruby | |
RUN apt-get install -y ruby | |
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
#!/bin/bash | |
cd /code | |
if [ -e code.c ]; then | |
gcc -o runner code.c || exit 1 | |
cat input | runner | |
elif [ -e code.cpp ]; then | |
cat input | runner | |
elif [ -e code.rb ]; then |
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
input = STDIN.read.split("\n") | |
input.shift # skip first line | |
puts input.map { |x| Integer(x) }.inject(&:+) |
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
FROM ubuntu:trusty | |
RUN apt-get update | |
# C/C++ | |
RUN apt-get install -y build-essential | |
# Ruby | |
RUN apt-get install -y ruby |
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
[ | |
{ | |
"Author": "MissHannahMinx", | |
"Title": "Japanese Word of The Day - Saikou 最高!", | |
"VideoUrl": "https://www.youtube.com/watch?v=3an7Nd_UJMQ", | |
"PlaceholderUrl": "https://i.ytimg.com/vi/LzOihTM-6SQ/mqdefault.jpg" | |
}, | |
{ | |
"Author": "MissHannahMinx", | |
"Title": "Japanese Word of the Day - TEENY TINY 小さい!", |