# Run the hello game:
python hello_game.py
# Run the hello and bye game:
python hello_and_bye_game.py
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
# app/controllers/sessions_controller.rb | |
class SessionsController < Devise::SessionsController | |
# This controller provides a JSON version of the Devise::SessionsController and | |
# is compatible with the use of SimpleTokenAuthentication. | |
# See https://github.com/gonzalo-bulnes/simple_token_authentication/issues/27 | |
def create | |
# Fetch params |
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
# safe merge | |
# | |
# merge the branch XXXXXXXX-add-example-feature into master | |
# make sure the feature is properly tested and | |
# doesn't break anything in its original context | |
git checkout XXXXXXXX-add-example-feature | |
rake # the test suite MUST NOT raise any error | |
# make sure your local copy of master is up-to-date |
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
# ... | |
# Add these lines at the end of your ~/.bash_profile | |
# Git functions (used to define a custom prompt) | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
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
# Rakefile | |
# Add Rainbow to the app dependencies. That's optional, but the result is worth it. | |
require 'rainbow' | |
# ... | |
# Validate an API against its API blueprint | |
# | |
# The API blueprints are expected to be stored in `doc/` and |
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
# Rakefile | |
begin | |
require 'rspec/core/rake_task' | |
desc 'Provide private interfaces documentation' | |
RSpec::Core::RakeTask.new(:spec) | |
namespace :spec do | |
desc 'Provide public interfaces documentation' |
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
# Rakefile | |
namespace :app_json do | |
desc 'Validate the app.json manifest' | |
task :validate do | |
require 'rainbow' | |
# check if the app.json validator is available | |
`which app.json` | |
if $?.exitstatus != 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
# Rakefile | |
begin | |
require 'inch/rake' | |
Inch::Rake::Suggest.new(:inch) do |suggest| | |
suggest.args << "--private" | |
suggest.args << "--pedantic" | |
end | |
rescue LoadError |
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
# Store all solarized files in one place - :) | |
mkdir ~/.solarized | |
cd ~/.solarized | |
# http://www.webupd8.org/2011/04/solarized-must-have-color-paletter-for.html | |
git clone https://github.com/seebi/dircolors-solarized.git | |
eval `dircolors ~/.solarized/dircolors-solarized/dircolors.256dark` | |
ln -s ~/.solarized/dircolors-solarized/dircolors.256dark ~/.dir_colors | |
git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git |
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
zookeeper: | |
image: confluent/zookeeper | |
ports: | |
- 2181 | |
kafka: | |
image: confluent/kafka | |
ports: | |
- "9092:9092" | |
links: |