Skip to content

Instantly share code, notes, and snippets.

View Pauloparakleto's full-sized avatar

Paulo Felipe Souza Pauloparakleto

View GitHub Profile
@Pauloparakleto
Pauloparakleto / gist:3cef9f75b8dce6215d00f073e6b977ca
Created November 21, 2022 13:21
Ruby 2.3.8 when rake --version
rake -v
/home/paulo-felipe/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/fog-1.19.0/lib/fog/core/collection.rb:150: warning: circular argument reference - filters
/home/paulo-felipe/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/fog-1.19.0/lib/fog/rackspace/mock_data.rb:43: warning: key "name" is duplicated and overwritten on line 81
/home/paulo-felipe/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/postgresql_adapter.rb:1222: [BUG] Segmentation fault at 0x00007fa55320c140
ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0100 p:---- s:0393 e:000392 CFUNC :initialize
c:0099 p:---- s:0391 e:000390 CFUNC :new
c:0098 p:0019 s:0381 e:000380 METHOD /home/paulo-felipe/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/p
@Pauloparakleto
Pauloparakleto / rails_7_pipeline.yml
Last active August 8, 2022 13:50
pipeline for rails 7
name: Ruby
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
db:
@Pauloparakleto
Pauloparakleto / class_var_ex.rb
Created July 22, 2022 13:55 — forked from sumanmukherjee03/class_var_ex.rb
Messing with class variables in ruby
# Execute this file as follows and compare the results in ruby 1.8.*:
#
# ruby class_var_ex.rb
# ruby class_var_ex.rb "include module"
# ruby class_var_ex.rb "include module" "include global"
# ruby "include global"
@@test = 9 if ARGV.last == "include global"
module X
@Pauloparakleto
Pauloparakleto / raw_image_to_jpg.rb
Last active October 1, 2020 17:24
Tired opening many images, convert it to jpg before sharing it with your friends? This ruby script use minimagick to read images and write it where you want. In general, the file name has a base like "IMG" + "(n+1)". Thus the script auto increment the last part, convert and write the correspondent name.
require 'mini_magick'
#Criar script IMG_#{numero + 1} for each loop
initial_number = 3746
final_number = 3774
image_name = ""
image_name_converted = ""
while initial_number < final_number
initial_number = initial_number + 1