-
[]([Link perfil no LinkedIn])
-
``
This file contains hidden or 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
module Shoulda | |
module Matchers | |
module ActiveRecord | |
# https://gist.github.com/mackato/6972768 | |
def have_store_accessor(key) | |
HaveStoreAccessor.new(key) | |
end | |
class HaveStoreAccessor | |
def initialize(key) |
This file contains hidden or 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
#Download Elementary OS from here: | |
#http://sourceforge.net/projects/elementaryos/files/stable/ | |
#First you update your system | |
sudo apt-get update && sudo apt-get dist-upgrade | |
#Install Google Chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' |
This file contains hidden or 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
module Arel | |
module Visitors | |
class ToSql | |
private | |
def visit_Arel_Nodes_BinaryMatches o | |
"#{visit o.left} LIKE BINARY #{visit o.right}" | |
end | |
end | |
end | |
end |
This file contains hidden or 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
Batman - Alef | |
Robin - Ruas | |
Majinbu - Lucas | |
Ben 10 - Gui | |
Psylocke - Laura | |
O Fera - Waldir | |
Honda - Cairo | |
Hancok - Tunico | |
Lanterna Verde - Leandrão | |
Hulk - Milk |
This file contains hidden or 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 ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
This file contains hidden or 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
rand_str = -> { (0...5).map { ('A'..'Z').to_a[rand(26)] }.join } | |
rand_number = -> { SecureRandom.random_number.to_s[-5..-1] } | |
code=rand_str.call | |
password=rand_number.call | |
school_id=85 | |
PiscoDataGenerator.create(code, password, school_id) |
This file contains hidden or 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
# http://stackoverflow.com/questions/8507798/rails-3-1-plugin-gem-dummy-test-app-rspec | |
# http://namick.tumblr.com/post/17663752365/how-to-create-a-gemified-plugin-with-rails-3-2-rspec | |
rails plugin new plugin_name --skip-test-unit --dummy-path=spec/dummy | |
cd plugin_name | |
# Add rspec-rails to gemspec dev deps | |
# s.add_development_dependency "rspec-rails" | |
bundle install |
This file contains hidden or 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
download: s3://appprova-test-coverage/coverage/34593036/codeclimate.1.json to coverage/codeclimate.1.json | |
DEBU[0000] posting request to https://api.codeclimate.com/v1/test_reports | |
DEBU[0000] {"data":{"type":"test_reports","attributes":{"ci_branch":"AP-3213/fix-student-report-xls-exportation","ci_build_identifier":"34593036","ci_build_url":"https://app.codeship.com/projects/95596/builds/34593036","ci_commit_sha":"c514a17255e80bc7c1a81e7c2e18304ebfc338c9","ci_committed_at":1527268414,"ci_service_name":"codeship","git_branch":"AP-3213/fix-student-report-xls-exportation","commit_sha":"c514a17255e80bc7c1a81e7c2e18304ebfc338c9","committed_at":1527268414,"run_at":1527274133,"covered_percent":96.13004666260905,"covered_strength":0,"environment":{"gem_version":"2.7.6","package_version":"","pwd":"/home/rof/clone","prefix":"/home/rof/clone","rails_root":"","reporter_version":"0.6.0","simplecov_root":""},"line_counts":{"missed":763,"covered":18953,"total":19716}}},"meta":null} | |
DEBU[0000] posting request to https://api. |
This file contains hidden or 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 | |
# USAGE: | |
# increment_weight.sh (with no params) will increment ALL pages with weight by 1. | |
# increment_weight.sh X (X is the param) will increment ALL pages with weight greather than X by 1. | |
MINIMUM_WEIGHT=$1 | |
if [ -z $MINIMUM_WEIGHT ]; then | |
MINIMUM_WEIGHT=0 | |
fi |
OlderNewer