Skip to content

Instantly share code, notes, and snippets.

"(^| )sentry\\/"
"[wW]get"
"^Apache-HttpClient"
"^curl"
"^LCC"
"007ac9 Crawler"
"2ip.ru"
"360Spider"
"A6-Indexer"
"Aboundex"
@zegomesjf
zegomesjf / migrate_from_int_to_bigint.rb
Created April 10, 2019 18:41
generates migration to change columns from integer to bigint
connection ||= ActiveRecord::Base.connection
tables = connection.tables
pks_to_be_changed = ''
fks_to_be_changed = ''
tables.each do |table|
connection.columns(table)
pk = connection.primary_key(table)
create_bigint_pk = false
connection.columns(table).each do |column|
@zegomesjf
zegomesjf / README-Template.md
Created May 29, 2018 14:25 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@zegomesjf
zegomesjf / ELP - Mind Games Circle.md
Created September 26, 2016 14:45
xadrez, poker, jogos

ELP - Mind Games Circle

História

A escola matriz tem uma sede provisória estabelecida num estúdio localizado na Av. Ipiranga, 895 (praticamente, esquina com a Av. São João).

Nessa sede há estrutura suficiente para reunir até 15 pessoas para conversar, estudar e praticar jogos intelectivos como Xadrez, Poker, Gamão, quebra-cabeças.

A ELP - Mind Games Circle pode dispor também de um salão que comporta até 70 pessoas muito confortavelmente.

@zegomesjf
zegomesjf / databases.js
Created August 1, 2014 11:58
databases from heroku
$('.dbList .dbItem_wr a').map(function(){return this.href }).get().join('\n');
namespace :db do
desc "Migrate the database (options: VERSION=x, VERBOSE=false)."
task migrate: :environment do
puts "ANTES DE TUDO"
verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
migrations_paths = ActiveRecord::Migrator.migrations_paths
puts "antes do verbose"
ActiveRecord::Migration.verbose = verbose
@zegomesjf
zegomesjf / gist:9805170
Created March 27, 2014 11:07
Freshbooks - Contractor data
ap c.contractor.list.first
[
[0] "contractors",
[1] {
"contractor" => [
[ 0] {
"contractor_id" => "xxxx",
"name" => "José Gomes Júnior",
"email" => "[email protected]",
# www.guepardolabs.com -> guepardolabs.com
# www.guepardolabs.com.br -> guepardolabs.com
# www.guepardolabs.net -> guepardolabs.com
# guepardolabs.com.br -> guepardolabs.com
# guepardolabs.net -> guepardolabs.com
require 'rack-rewrite'
use Rack::Rewrite do
r301 %r{.*}, 'http://guepardolabs.com$&', :if => Proc.new {|rack_env|
rack_env['SERVER_NAME'] != 'guepardolabs.com'
}
;var FooBar = (function($, window, document, undefined) {
'use strict';
/**
* Constructor method
*
* @author Gustavo Franco
* @since 2013-06-27
*/
function FooBar() {