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
brew remove mysql | |
brew cleanup | |
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist | |
rm ~/Library/LaunchAgents/com.mysql.mysqld.plist | |
sudo rm -rf /usr/local/var/mysql |
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
#------------------------------------------------------------------------------ | |
# Rotinas para verificação de CPF e CNPJ | |
# Linguagem: Ruby | |
# Escrito por: André Camargo < andre@boaideia.inf.br > http://blog.boaideia.inf.br | |
# Use, copie, melhore a vontade! Patches são bem-vindos... | |
#------------------------------------------------------------------------------ | |
def check_cpf(cpf=nil) | |
return false if cpf.nil? | |
nulos = %w{12345678909 11111111111 22222222222 33333333333 44444444444 55555555555 66666666666 77777777777 88888888888 99999999999 00000000000} |
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
cities = ["London", "San Francisco", "Tokyo", "Barcelona", "Sydney"] | |
sorted_cities = cities.sort | |
if sorted_cities.include?("London") | |
puts "London is city number #{sorted_cities.index('London')} in the list" | |
} |
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
pt-BR: | |
errors: | |
messages: | |
expired: 'expirou, por favor solicite um novo' | |
not_found: 'não encontrado' | |
already_confirmed: 'já foi confirmado, por favor tente fazer login' | |
not_locked: 'não estava bloqueado' | |
not_saved: | |
one: "1 erro impediu que %{resource} fosse salvo:" | |
other: "%{count} erros impediram que %{resource} fosse salvo:" |
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
#! /bin/bash | |
create_tag(){ | |
TAG=deployed_at_$(date +"%F_%H-%M") | |
git tag -m '' -a $TAG | |
git push --tags | |
} | |
quick_deploy(){ | |
echo 'Starting quick deploy...' |
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 "io/console" | |
COLORS = { | |
black: 0, | |
red: 31, | |
green: 32, | |
blue: 34 | |
} | |
loop do |
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 | |
# by @tapbot_paul | |
# http://dump.beaugil.es/blog/itunesmatch/ | |
# Don't blame me if this nukes your metadata, formats your drive, kills your kids | |
# This script goes through any iCloud Matched songs in your iTunes library and tries to update the | |
# metadata from the iTunes Store | |
# Will run against selected tracks or if nothing selected entire library | |
# install the required gems with the following commands |
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
* UTC -11:00 * | |
American Samoa | |
International Date Line West | |
Midway Island | |
Samoa | |
* UTC -10:00 * | |
Hawaii | |
* UTC -09:00 * |
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 | |
# frozen_string_literal: true | |
require "httparty" | |
class Converter | |
def initialize(filename) | |
@content = File.open(filename).read | |
end | |
attr_reader :content |
NewerOlder