Skip to content

Instantly share code, notes, and snippets.

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

Alex Ishida alexishida

👨‍💻
Coding
View GitHub Profile
@alexishida
alexishida / GITLAB_OMNIBUS_CONFIG.rb
Created September 21, 2018 16:08
Omnibus config for Rancher deploy
# Original file https://gitlab.com/snippets/1665044
external_url 'https://git.meetup.rancher.space'
gitlab_rails['gitlab_ssh_host'] = 'git.meetup.rancher.space'
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = '[email protected]'
gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
gitlab_rails['gitlab_email_reply_to'] = '[email protected]'
gitlab_rails['gravatar_plain_url'] = 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
gitlab_rails['gravatar_ssl_url'] = 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
gitlab_rails['gitlab_shell_ssh_port'] = 2222
@alexishida
alexishida / wordpress-nginx-s3-security.txt
Created September 26, 2018 12:04
Nginx security config to use in wordpress with s3 or another cloud storate
# SECURITY ( Valido somente para uploads enviados para s3 ou outros tipos de cloud storage )
location /wp-content/uploads/ {
deny all;
}
location ~* \.(pl|cgi|py|sh|lua)\$ {
return 444;
@alexishida
alexishida / rjb-example.txt
Last active May 21, 2019 17:39
RJB Ruby-Java bridge using Java Native Interface.
----------------------------------------
Setup JAVA_HOME enviromental varible
----------------------------------------
Add in Gemfile:
----------------------------------------
gem 'rjb'
@alexishida
alexishida / nginx-websocket-lb.conf
Last active November 18, 2021 00:11
Configuring nginx as a proxy / load balancer (HTTP and Websocket connections)
# https://deepstreamhub.com/blog/load-balancing-websocket-connections
# https://deepstreamhub.com/open-source/integrations/other-nginx
# Websocket
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_set_header Connection $http_connection;
@alexishida
alexishida / linux-software.txt
Last active September 4, 2024 13:22
Linux Softwares
--- Persepolis Download Manager ---
sudo add-apt-repository ppa:persepolis/ppa
sudo apt update
sudo apt install persepolis
----- Grub Customizer ------
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt update
sudo apt-get install grub-customizer
# or https://launchpad.net/~danielrichter2007/+archive/ubuntu/grub-customizer/+packages
@alexishida
alexishida / rbenv-ruby-rails-update.sh
Last active October 18, 2025 00:36
Script to update rbenv, Ruby and Ruby on Rails versions
#!/bin/bash
#---------------------------------------------------------------------------------------
# Script to update rbenv, Ruby and Ruby on Rails versions
# Source: https://gist.github.com/alexishida/015b074ae54e1c7101335a2a63518924
#
# Author: Alex Ishida <[email protected]>
# Version: 1.7.2 - 17/10/2025
#---------------------------------------------------------------------------------------
#
# If you want install rbenv for the first time
@alexishida
alexishida / css-unit-converter.txt
Created November 21, 2018 01:40
CSS Unit Converter
# https://www.w3schools.com/cssref/css_units.asp
# https://offroadcode.com/rem-calculator/
# http://simplecss.eu/pxtoems.html
# https://www.webdesignrankings.com/resources/rqrwd/
1px = 0.0625rem
2px = 0.125rem
3px = 0.1875rem
4px = 0.25rem
@alexishida
alexishida / puma.rb
Last active November 28, 2018 17:44
production config/puma.rb
# Change to match your CPU core count
# grep -c processor /proc/cpuinfo
workers 2
# Min and Max threads per worker
threads 1, 6
app_dir = File.expand_path("../..", __FILE__)
shared_dir = "#{app_dir}/shared"
@alexishida
alexishida / add-local-jar-maven.txt
Created November 29, 2018 16:43
Add Local jar in maven
Simple ways to add and work with a `.jar` file in your local maven setup
# Add to project as system scoped file
As a short term tactic, I have also added the .jar as a system scoped file.
I did this in the past when working with a ‘bug fix’ version of Selenium WebDriver that had not yet propagated through to maven central, but which was available for download.
<dependency>
<groupId>selenium_2_53_1</groupId>
@alexishida
alexishida / sites-vagas-dev-ti.md
Created January 11, 2019 04:43
Site de Empregos na Área Desenvolvimento de TI