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
mysql> repair table posts; | |
+----------------------------+--------+----------+-------------------------------------------------------------------+ | |
| Table | Op | Msg_type | Msg_text | | |
+----------------------------+--------+----------+-------------------------------------------------------------------+ | |
| strands_development2.posts | repair | Error | Incorrect information in file: './strands_development2/posts.frm' | | |
| strands_development2.posts | repair | error | Corrupt | | |
+----------------------------+--------+----------+-------------------------------------------------------------------+ |
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 Piso < Property | |
before_save :assign_family | |
def assign_family | |
self.family_id = 1 | |
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
>> r.list_range("Post:list", 0, -1) | |
=> ["1", "2"] | |
>> r.keys 'Post:*:id' | |
=> ["Post:1:id", "Post:2:id"] | |
>> r.keys 'Post:*:created_at' | |
=> ["Post:1:created_at", "Post:2:created_at"] | |
>> r.call_command ["SORT Post:list", "BY Post:*:created_at", "GET Post:*:id", "ALPHA DESC"] | |
RuntimeError: -ERR no such key | |
from /home/mauro/src/xing/rails-app/gems/gems/redis-0.0.3.4/lib/redis.rb:250:in `read_reply' | |
from /home/mauro/src/xing/rails-app/gems/gems/redis-0.0.3.4/lib/redis.rb:175:in `raw_call_command' |
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
mauro@vm0:~/src/cijoe [master] $ rip install rspec | |
No such file or directory - /home/mauro/.rip/rip-packages/rspec-7a5e2627bd85701208afa056806c47fe | |
rip: install failed | |
-> No such file or directory - /home/mauro/.rip/rip-packages/rspec-7a5e2627bd85701208afa056806c47fe | |
mauro@vm0:~/src/cijoe [master] $ ls /home/mauro/.rip/rip-packages/rspec- | |
rspec-2bc84dc69b73db9383b9c6711d2011b7/ rspec-7a5e2627bd85701208afa056806c47fe.gem | |
mauro@vm0:~/src/cijoe [master] $ find /home/mauro/.rip/rip-packages/ | |
/home/mauro/.rip/rip-packages/ | |
/home/mauro/.rip/rip-packages/rspec-7a5e2627bd85701208afa056806c47fe.gem | |
/home/mauro/.rip/rip-packages/rspec-2bc84dc69b73db9383b9c6711d2011b7 |
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
_ __ ____ __ _ _______ _ _ | |
| |/ / / /\ \ / / | | |__ __| | | | | |
| ' / ___ _ _ / / \ \ / /__ _| |_ _ ___ | | __ _| | | __ | |
| < / _ \ | | | / / \ \/ // _` | | | | |/ _ \ | |/ _` | | |/ / | |
| . \ __/ |_| |/ / \ /| (_| | | |_| | __/ | | (_| | | < | |
|_|\_\___|\__, /_/ \/ \__,_|_|\__,_|\___| |_|\__,_|_|_|\_\ | |
__/ | | |
|___/ | |
Useful links: |
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
Caníbales | |
En Suiza, después de un exhaustivo proceso de entrevistas, tests y dinámicas de | |
grupo, una gran empresa, para no defraudar las leyes de discriminación, | |
contrata a un grupo de caníbales. | |
El Gerente de Personal, durante la ceremonia de bienvenida les dice: | |
'Ahora forman parte de un gran equipo. Ya pueden disfrutar de todos los | |
beneficios de la empresa.Por ejemplo, pueden ir al restaurante de la empresa |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'pp' | |
# User provided Book Depository wishlist. | |
wishlist_url = 'http://www.bookdepository.com/wishlist/507838/Mauro-Pompilio' | |
# Fectch the wishlisted books. | |
def fetch_books(wishlist_url, page=1) | |
doc = Nokogiri::HTML(open("#{wishlist_url}/?page=#{page}")) |
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
after "deploy:update", "deploy:cleanup" | |
after "deploy:update", "foreman:export" | |
after "deploy:symlink", "update_haproxy_config_symlink" | |
namespace :deploy do | |
task :stop do | |
run "sudo stop goliath_app" | |
end | |
task :start do | |
run "sudo start goliath_app" |
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
# Send notifications to Airbrake asynchronously using em-http. | |
# Doesn't handle Airbrake conn options but works for the default settings. | |
module Airbrake | |
class Sender | |
def send_to_airbrake(data) | |
client = EM::HttpRequest.new(url) | |
client.post(:head => HEADERS, :body => data) | |
rescue => ex | |
p [:AIRBRAKE_ERROR, ex.message, data] | |
end |
OlderNewer