Skip to content

Instantly share code, notes, and snippets.

View Ribeiro's full-sized avatar
💭
I may be slow to respond.

Geovanny Ribeiro Ribeiro

💭
I may be slow to respond.
  • GTech Software Services
  • Fortaleza(CE) - Brasil
  • 07:34 (UTC -03:00)
  • LinkedIn in/geovanny-ribeiro
View GitHub Profile
@Ribeiro
Ribeiro / rest_quick_reference.md
Created June 12, 2018 12:17 — forked from odan/rest_quick_reference.md
REST, RESTful API Quick Reference

REST, RESTful API Quick Reference

A good API is not just easy to use but also hard to misuse.

Ressources

  • Version your API
    • Path: /v1/users
    • Subdomain: api.v1.example.com/users
@Ribeiro
Ribeiro / cpf_cnpj_validator
Created May 7, 2018 13:59 — forked from igorcosta/cpf_cnpj_validator
Regex para validar CPF e CNPJ
Para CPF
/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/
Para CNPJ
/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/
Para ambos ao mesmo tempo
@Ribeiro
Ribeiro / isBase64.js
Created April 5, 2018 14:11 — forked from RyanNutt/isBase64.js
Check if a String is base64 encoded using JavaScript - from https://stackoverflow.com/a/34068497/1561431
function isBase64(str) {
try {
return btoa(atob(str)) == str;
} catch (err) {
return false;
}
}
@Ribeiro
Ribeiro / java-maven.gitignore
Created March 22, 2018 14:26
.gitignore File for Java (Maven) Projects
#---------------------------------------#
# Project Ignores #
#---------------------------------------#
# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
@Ribeiro
Ribeiro / background.html
Created March 14, 2018 11:24 — forked from srsudar/background.html
Pasting from the system clipboard using a Chrome extension.
<!DOCTYPE html>
<html>
<head>
<script src="background.js"></script>
</head>
<body>
<textarea id="sandbox"></textarea>
</body>
@Ribeiro
Ribeiro / gist:a386de8d5fbdf2ebbebdaad322ffab5e
Created January 22, 2018 11:38 — forked from khakimov/gist:3558086
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@Ribeiro
Ribeiro / watchfile.sh
Created December 29, 2017 12:21 — forked from swarminglogic/watchfile.sh
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@Ribeiro
Ribeiro / class_logger.asp
Created July 12, 2017 18:47 — forked from CarlRevell/class_logger.asp
Simple classic ASP log to file class.
<%
'// Usage:
'//
'// dim l : set l = new logger
'// l.log("Hello")("World")
'// l.includeTimetamp = false
'// l("Lorem ipsum")
'// l.setLogFile("c:\temp\log_2.log").log("This is a new log!")
'// set l = nothing
@Ribeiro
Ribeiro / oracle.md
Created March 24, 2017 19:41 — forked from ddanailov-nmdp/oracle.md
Installing Oracle 11g on OS X 10.11 El Capitan
@Ribeiro
Ribeiro / attachinary_setup.md
Created October 24, 2016 19:34 — forked from ssaunier/attachinary_setup.md
Attachinary Setup in Rails 5

Attachinary Setup

First add the following gems to your Gemfile:

# Gemfile
gem "attachinary"
gem "jquery-fileupload-rails"
gem "coffee-rails"