Skip to content

Instantly share code, notes, and snippets.

View alexishida's full-sized avatar
👨‍💻
Coding

Alex Ishida alexishida

👨‍💻
Coding
View GitHub Profile
@oliveira-andre
oliveira-andre / rails_6_notations.md
Last active December 2, 2019 13:36
rails 6 annotations

coffee and jquery

  • Coffee and another gems like jquery is installed on yarn and imported on app/javascripts/application.js

    rails webpacker:install:coffee

    References

@alexishida
alexishida / rails-pt-br-internacionalizacao.txt
Last active May 31, 2023 16:44
Internacionalizacao Rails para pt-BR locale i18n
# Artigo ogirinal por JORGE VILAÇA
# https://jorgevilaca.wordpress.com/2012/03/06/nacionalizando-rails-para-pt-br/
# config/application.rb
config.i18n.default_locale = 'pt-BR'
config.time_zone = 'La Paz'
config.active_record.default_timezone = :local
# config/locales/pt-BR.yml
@alexishida
alexishida / comandos-ruby-rails-exemplos.txt
Last active September 5, 2024 14:00
Comandos Ruby e Rails
# COMANDOS
rails new appname -d postgresql
rails new appname --api
gem install rails -v 6.1.4.4
rails _6.1.4.4_ new myapp
# Rails sem webpack
rails new app-name --skip-webpack-install --skip-javascript
@alexishida
alexishida / rbenv-ruby-rails-install.sh
Last active September 7, 2024 02:23
Script to install rbenv, Ruby, nodejs and yarn
#!/bin/bash
#---------------------------------------------------------------------------------------
# Script to install rbenv, Ruby, nodejs and yarn
# Source: https://gist.github.com/alexishida/655fb139c759393ae5fe47dacd163f99
#
# Author: Alex Ishida <alexishida@gmail.com>
# Version: 1.6.4 - 23/08/2024
#---------------------------------------------------------------------------------------
#
# HOW TO INSTALL A SCRIPT
@0mkara
0mkara / Ethereum_private_network.md
Last active July 2, 2024 00:56
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@mrbongiolo
mrbongiolo / precompile.md
Last active February 27, 2023 00:16
HOW TO: Rails 4.2 add 'vendor/asset' to precompile list

To enable the precompilation of all non.js/.css assets within vendor/assets just add this to config/initializers/assets.rb:

Rails.application.config.assets.precompile << Proc.new { |path, fn| fn =~ /vendor\/assets/ && !%w(.js .css).include?(File.extname(path)) }

Be aware that this will precompile ALL non .js/.css assets that you have there, some plugins or libraries might have .txt or other files around, and those would end up into your precompiled list also.

If you need to precompile images only, you could use this:

Rails.application.config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)