TLD | Company |
---|---|
.ITAU | Itau Unibanco Holding S.A. |
.BRADESCO | Banco Bradesco S.A. |
.IPIRANGA | Ipiranga Produtos de Petroleo S.A. |
.BOM | Núcleo de Informação e Coordenação do Ponto BR - NIC.br |
.FINAL | Núcleo de Informação e Coordenação do Ponto BR - NIC.br |
.RIO | Empresa Municipal de Informática SA - IPLANRIO |
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
FROM ubuntu:trusty | |
# Update the repository | |
RUN apt-get update | |
# Install necessary tools | |
RUN apt-get install -y wget net-tools build-essential git | |
# Setup Install Nginx | |
RUN wget -q -O - http://nginx.org/keys/nginx_signing.key | apt-key add - |
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
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.stream.IntStream; | |
public class HappyNumber { | |
public static void main(String[] args) { | |
IntStream.range(0, args.length == 0 ? 1001 : Integer.parseInt(args[0])) | |
.parallel() | |
.filter((number) -> { |
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
#!/usr/bin/env ruby | |
# Reveal in GitHub TextMate command | |
require 'pathname' | |
path = Pathname.new(ENV["TM_FILEPATH"]).relative_path_from(Pathname.new(ENV["TM_PROJECT_DIRECTORY"])) | |
repo_path = `/usr/local/bin/git remote show origin`[/Fetch URL: git@(.*)\.git$/, 1].tr(":", "/") | |
branch = `/usr/local/bin/git symbolic-ref HEAD`[/refs\/heads\/(.*)$/, 1] | |
exec "open 'http://#{repo_path}/blob/#{branch}/#{path}'" |
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
ruby-1.9.2-p290 :001 > 0/0 | |
ZeroDivisionError: divided by 0 | |
from (irb):1:in `/' | |
from (irb):1 | |
from /Users/rafael/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>' | |
ruby-1.9.2-p290 :002 > 1.0/0 | |
=> Infinity | |
ruby-1.9.2-p290 :003 > 0.0/0 | |
=> NaN | |
ruby-1.9.2-p290 :004 > |
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
# account.rb | |
class Account < ActiveRecord::Base | |
has_many :users | |
has_many :services | |
end | |
# user.rb | |
class User < ActiveRecord::Base | |
belongs_to :account | |
end |
This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.
Huge thanks to funny-falcon for the performance patches.
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
Array.prototype.map = function(f) { | |
return this.fold([], function(current, el) { | |
return [f(current)].concat(el); | |
}); | |
} | |
Number.prototype.sum = function(val) { | |
return this + val; | |
} |
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
%% Copyright (C) 2011 Claudemiro Feitosa <dimiro1@gmail.com> | |
%% | |
%% Fortemente baseado no abnt-UFPR.sty | |
%% | |
\NeedsTeXFormat{LaTeX2e} | |
\usepackage[utf8]{inputenc} | |
%% http://www.terminally-incoherent.com/blog/2006/12/17/latex-numbered-subsubsections/ |
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
# gem install dnsimple-ruby | |
# $ <SPACE>PASSWORD="your password" EMAIL="your e-mail" ruby dnsimple_backup.rb > dnsimple_backup.yml | |
# when you put a space before running a command you prevent it from being added to the history. | |
require "dnsimple" | |
require "yaml" | |
DNSimple::Client.username = ENV.fetch("EMAIL") | |
DNSimple::Client.password = ENV.fetch("PASSWORD") |
OlderNewer