Skip to content

Instantly share code, notes, and snippets.

View shingonoide's full-sized avatar

Rui Andrada shingonoide

View GitHub Profile
@shingonoide
shingonoide / check_url_spec_error.md
Last active September 9, 2017 03:44 — forked from RafaelPrallon/check_url.md
método, spec e erros no terminal de um método para verificar se a url tem http:// ou https://

método(localizado em app/helpers/application_helper.rb):

def check_url(url)
  return true if /^(?:(?:https\:\/\/))|(?:(?:http\:\/\/))/.match(url)
  return false
end

spec(localizado em spec/models/user_spec.rb):

@shingonoide
shingonoide / dabblet.css
Last active August 29, 2015 14:28 — forked from chriscoyier/dabblet.css
Checkbox Hack
/* Checkbox Hack */
input[type=checkbox] {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
-webkit-appearance: push-button;
-moz-appearance: button;

This grouped bar chart is constructed from a CSV file storing the populations of different states by age group. The chart employs conventional margins and a number of D3 features:

@shingonoide
shingonoide / README.md
Last active August 29, 2015 14:02 — forked from mbostock/.block
# encoding: UTF-8
namespace :brazil do
desc "Load brazilian states for spree store"
task :states => :environment do
brazil = Country.find :first, :conditions => {:name => "Brazil"}
states = <<STATES
AC,Acre
AL,Alagoas
AP,Amapá
AM,Amazonas