Skip to content

Instantly share code, notes, and snippets.

View eugenio-oliveira's full-sized avatar

Eugênio Oliveira eugenio-oliveira

  • Freelancer
  • Teresina - Piauí, Brazil
View GitHub Profile
#### Customize BASH PS1 prompt to show current GIT repository and branch. ####
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# Reset
Color_Off="\[\033[0m\]" # Text Reset
# Regular Colors
Black="\[\033[0;30m\]" # Black
Red="\[\033[0;31m\]" # Red
@eugenio-oliveira
eugenio-oliveira / arquivo.dat
Last active July 26, 2019 00:56
leitor de gabaritos
003000001001030617001 5372 #0001 N 081203031 EEECBEBABABCEEAACDAEDABCCDDBEAEAEAEABBDBACCACDEBBEDCBEDEBBDCCDCDABBEADDBACEDCEABCDBCCECEED
003000002001030617001 5372 #0001 N 020100180 EEDBBEDABBECACBADEAECADACDDBAACEEBCAABEAACAACDEBAEACBEDCCBECCDECABBEDEDBACAACEAEBDDBCECADA
003000003001030617001 5372 #0001 N 050402301 CEEEBEDABBBCEAEEDEDDDEBCCDDBEAEAECEDCBDDDCCACDEBBEDCBEDEBBDACDCDABBEEDABACEDCECBCDBCCEBEDD
003000004001030617001 5372 #0001 N 030200730 BBEBBCBBBABCACEABDDCDABECAECAECEEAEBABDDADCACDEBBEDCCEDABDECCBCDAABEEDCBDCAACECACDBCCDDACB
003000005001030617001 5372 #0001 N 030201161 EEDBBEAABBCCCEEACCBEEABECDEBAAEEEDEEBBDBACCACDEBBEBCCEDCBBECCDADABBEEDBBCEADCECECDBCCDCEBD
003000006001030617001 5372 #0001 N 020100670 EEABAECAABCCDDBACDEDBBBDBDEBACAAECEABBCCBBAACDEBBEDCBEDCBBECCDCDABBEEDBBACEDCECBDDBDCEBEDD
003000007001030617001 5372 #0001 N 011404641 EEEBDCDABEEBEABABDBEEBBCCDDBBACAEBEBBBDEECCCCDC
@eugenio-oliveira
eugenio-oliveira / inflections.rb
Created July 10, 2019 19:55
Brazilian Portuguese Inflections For Ruby on Rails Applications
# encoding: utf-8
ActiveSupport::Inflector.inflections do |inflect|
inflect.clear
inflect.plural(/$/, 's')
inflect.plural(/(s)$/i, '\1')
inflect.plural(/^(paí)s$/i, '\1ses')
inflect.plural(/(z|r)$/i, '\1es')
inflect.plural(/al$/i, 'ais')
inflect.plural(/el$/i, 'eis')
inflect.plural(/ol$/i, 'ois')
@eugenio-oliveira
eugenio-oliveira / comandos_curl.txt
Last active November 8, 2018 19:04
Comandos CURL
# GET
curl http://localhost:4000/contacts/
# POST
curl http://localhost:4000/contacts/ -X POST -H "Content-Type: application/json" -d '{"name" : "Eugênio Oliveira", "email": "eugenio@infoway-pi.com.br"}'
# PATCH
curl http://localhost:4000/contacts/101/ -X PATCH -H "Content-Type: application/json" -d '{"name" : "Eugênio Oliveira", "email": "eugenio@infoway-pi.com.br", "birthdate" : "07/11/1984"}'
# DELETE
@eugenio-oliveira
eugenio-oliveira / functions.js
Last active October 4, 2018 02:10
Formas de declarar funções em JavaScript
//Anonymous Functions
var test1 = function(){
console.log("Anonymous Function Started");
}
//Arrow Functions
const test2 = () => {
console.log("Arrow Function Started");
}
1. CONHECIMENTOS BÁSICOS
I - LÍNGUA PORTUGUESA
1. Compreensão e interpretação de textos de gêneros variados.
2. Reconhecimento de tipos e gêneros textuais.
3. Domínio da ortografia oficial.
4. Domínio dos mecanismos de coesão textual.
4.1 Emprego de elementos de referenciação, substituição e repetição, de conectores e de outros elementos de sequenciação textual.
4.2 Emprego de tempos e modos verbais.
5. Domínio da estrutura morfossintática do período.
#### Customize BASH PS1 prompt to show current GIT repository and branch. ####
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
## For osx (10.10), if your OS is linux like, comment this if block
if [ -f ~/.git-prompt.sh ]; then
source ~/.git-prompt.sh
export PS1='Geoff[\W]$(__git_ps1 "(%s)"): '
fi
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [10174]... waiting for server to be ready... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
NoMethodError: undefined method `without_prepared_statement?' for #<ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter:0x000000045a5330>: SELECT "SCHEMA_MIGRATIONS".* FROM "SCHEMA_MIGRATIONS"
Rails.root: /var/www/rails_apps/oracleapp
Application Trace | Framework Trace | Full Trace
activerecord-oracle_enhanced-adapter (1.5.5) lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:755:in `block in exec_query'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:425:in `block in log'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
activerecord-oracle_enhanced-adapter (1.5.5) lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1510:in `log'
ActiveRecord::StatementInvalid: NoMethodError: undefined method `without_prepared_statement?' for #<ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter:0x000000051c0660>: SELECT "SCHEMA_MIGRATIONS".* FROM "SCHEMA_MIGRATIONS"