Skip to content

Instantly share code, notes, and snippets.

View rhogeranacleto's full-sized avatar
👄
CSS is the best programming language at all!

Rhoger Anacleto rhogeranacleto

👄
CSS is the best programming language at all!
View GitHub Profile
@rhogeranacleto
rhogeranacleto / create_extension.sh
Created November 8, 2017 11:19
Install extension on psql
sudo su
#senha do pc
su postgres
psql banco_a_ser_instalado
CREATE EXTENSION IF NOT EXISTS unaccent;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
@rhogeranacleto
rhogeranacleto / get_de_vehiculos.js
Last active October 20, 2017 19:17
Analise do show do veículo
'use strict';
const fs = require('fs');
const getDeVehiculosJSON = require('/home/roger/GIT/get_de_vehiculos.json');
const isArray = /(.+)\.\d\.(.+)/;
const result = '/home/roger/GIT/get_de_vehiculos_result.json';
const files = {
showHBS: '/home/roger/GIT/newfleet/emberjs/app/templates/client/vehicles/show.hbs',
@rhogeranacleto
rhogeranacleto / nflt-1311.js
Created October 11, 2017 20:19
NFLT-1311 [RELATÓRIOS] Colunas Usuário em relatórios aparecer o nome dos usuários (ou o login) NFLT-2344 Alterar models
'use strict';
const fs = require('fs');
const dir = './app/src/models';
const MODEL_NAME = /.+define\('(\w+)'.+/m;
const ASSOCIATE = /associate/g;
function readdir() {
@rhogeranacleto
rhogeranacleto / mmc.js
Created September 19, 2017 13:08
Calculo de Mínimo Múltiplo Comum em Javascript / Calculation of Common Minimum in Javascript
function divisibleAll(numbers, multiple) {
for (let i = 0; i < numbers.length; i++) {
if (multiple % numbers[i] !== 0) {
return false;
}
}
@rhogeranacleto
rhogeranacleto / prod_access.sh
Last active October 16, 2017 16:45
Acessar servidor e editar um arquivo
# Acesso API 1
ssh -i './view-prod.pem' [email protected] -p 41010
# Acesso API 2
ssh -i './view-prod.pem' [email protected] -p 41010
# Jobs 1
ssh -i './view-prod.pem' [email protected] -p 41010
# Jobs 2
@rhogeranacleto
rhogeranacleto / promise-hash.js
Last active May 15, 2017 12:15
Implement Promise by object parameters
'use strict';
Object.defineProperties(Promise, {
when: {
configurable: false,
enumerable: false,
writable: false,
value: function name(hash) {
var $q = [];