Skip to content

Instantly share code, notes, and snippets.

View tinogomes's full-sized avatar
😀

Celestino Gomes tinogomes

😀
View GitHub Profile
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active April 15, 2024 07:22
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@tinogomes
tinogomes / domingo-manha.md
Last active January 7, 2024 05:58
IBG - Louvor - Semana 01/2024

Ao ergermos as mãos

Ao erguermos as mãos pra adorar
E clamarmos a Ti, Tu virás
Nós viemos aqui, Te adorar
Deus de graça e favor

És Tu meu Senhor
Digno és do meu louvor
Só Tu és, todos dirão

@tinogomes
tinogomes / start_stop_memcached_script.sh
Created June 21, 2010 17:34
Script sample to start/stop for linux with nohup
#!/bin/bash
#
BASE=/tmp
PID=$BASE/app.pid
LOG=$BASE/app.log
ERROR=$BASE/app-error.log
PORT=11211
LISTEN_IP='0.0.0.0'
MEM_SIZE=4
@tinogomes
tinogomes / gist:771704
Created January 9, 2011 13:56
Backing Up Your Wii Game Overview with MAC OS X
Extracted from http://chris-fletcher.com/2009/05/17/backup-and-burn-wii-games-on-a-mac/
1. Insert the Wii Game disc into your DVD drive.
2. Click Ignore
3. Open Terminal ( Applications -> Utilities -> Terminal
4. Type drutil status ( Get the Name i.e. /dev/disk1 )
5. Type dd if=/path_to_dvd of=/game_name.iso and wait 15 min
6. Type drutil eject to eject your game.
To copy
@tinogomes
tinogomes / POSTGRES EM MEMORIA.md
Created September 14, 2023 12:47
Usanfo PostgreSQL na Memória (não testei, apenas salvei)
@tinogomes
tinogomes / app__controllers__factories_controller.rb
Created July 20, 2023 16:50
Rails controllers for FactoryBot on tests
# https://raw.githubusercontent.com/cirdes/gurusp-playwright/master/app/controllers/factories_controller.rb
# frozen_string_literal: true
require 'factory_bot'
class FactoriesController < ApplicationController
respond_to :json
rescue_from Exception, with: :show_errors
@tinogomes
tinogomes / gist:7ca162a0110be69a4a64
Last active July 14, 2023 22:12
Frases - Porta dos Fundos - Mundo dos Negócios

https://www.youtube.com/watch?v=cPbl26Fw-dk

  • Quer brincar de Eike Bastista nessa porra!
  • Matar um leão por dia.
  • Faca nos dentes
  • Sangue no olho
  • É matar ou morrer
  • Dando muque em macaco de gaveta
  • É largar mato na caçamba
  • Jogar terra na boca de carrapato
@tinogomes
tinogomes / louvores.md
Last active April 26, 2023 17:19
Louvores

Louvores

Grande é o Senhor (A) - Adhemar de Campos

[: A9 | D9 | E :] A9 | Bm7 C#m7 | D9 E 
R: [:A9 | C#m | D9 A/C# | Bm E :] | A9

Atos 2 (G) Nós estamos aqui...

// https://www.mql5.com/pt/articles/751
#define ERROR -1;
//+------------------------------------------------------------------+
//| Checking if a given filling mode is allowed |
//+------------------------------------------------------------------+
bool IsFillingTypeAllowed(string symbol, int fill_type)
{
@tinogomes
tinogomes / array_benchmakr.rb
Created March 15, 2023 19:45
Benchmark to create an array on Ruby
require "rubygems"
require "benchmark"
def run
text = 'HEADER'
n = 30
n_times = 1_000_000
base = [text]
range = (1..30)