#Day 1:
##Microservices in practice via @janogonzalez https://speakerdeck.com/janogonzalez/microservices-in-practice
###Microservices http://microservices.io/patterns/microservices.html
Gem | |
https://github.com/mileszs/wicked_pdf | |
Downloads | |
https://code.google.com/p/wkhtmltopdf/downloads/list?can=1&q= | |
Guides / Common issues | |
http://snikt.net/blog/2012/04/26/wicked-pdf/ | |
https://gist.github.com/wrburgess/3778949 | |
https://github.com/mileszs/wicked_pdf/wiki/Background-PDF-creation-via-delayed_job-gem |
sudo apt-get install phantomjs | |
cd /usr/bin | |
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-i686.tar.bz2 | |
sudo tar xjf phantomjs-1.9.2-linux-i686.tar.bz2 | |
sudo ln -s phantomjs-1.9.2-linux-i686/bin/phantomjs /usr/local/share/phantomjs | |
sudo ln -s phantomjs-1.9.2-linux-i686/bin/phantomjs /usr/local/bin/phantomjs | |
sudo rm phantomjs | |
sudo ln -s phantomjs-1.9.2-linux-i686/bin/phantomjs /usr/bin/phantomjs |
You need to execute the prepare and migrate command, to get all the schema up to date and with a good shape: | |
RAILS_ENV=test rake test:prepare | |
RAILS_ENV=test rake db:migrate |
Libraries: | |
http://cukes.info/ | |
http://jnicklas.github.io/capybara/ | |
https://github.com/teampoltergeist/poltergeist | |
http://phantomjs.org/ | |
How to: | |
http://www.railsonmaui.com/tips/rails/capybara-phantomjs-poltergeist-rspec-rails-tips.html | |
https://github.com/teampoltergeist/poltergeist#installing-phantomjs |
#Day 1:
##Microservices in practice via @janogonzalez https://speakerdeck.com/janogonzalez/microservices-in-practice
###Microservices http://microservices.io/patterns/microservices.html
#!/usr/bin/env python | |
import json | |
import csv | |
f = open('FILE.json') | |
data = json.load(f) | |
f.close() | |
f=csv.writer(open('FILE.csv','wb+')) |
##How I learned to Code by Making 180 websites in 180 days via @JenniferDewalt http://jenniferdewalt.com/
##ES6 Rocks! via @jaydson https://speakerdeck.com/jaydson/es6rocks-jsconf-argentina-2014
##Moving JS from Libraries to Polyfills via @sebmarkbage http://blog.calyptus.eu/ https://cdn.polyfill.io/v1/docs/
#SOLID Principles with ruby examples
##SRP - Single responsibility principle A class should have only a single responsibility.
Every class should have a single responsibility, and that responsibility should be entirely encapsulated. All its services should be narrowly aligned with that responsibility, this embrace the high cohesion.
##OCP - Open/closed principle Software entities should be open for extension, but closed for modification.
class Player | |
def play_turn(warrior) | |
@warrior = warrior | |
@health ||= warrior.health | |
@direction ||= :forward | |
warrior_feel = @warrior.feel @direction | |
if enemy_ahead? | |
@warrior.shoot! | |
elsif warrior_feel.empty? |
@results = Rails.cache.fetch "your_cache_key", :expires_in => 1.days do | |
#Do the query | |
end |