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 / use-axios.ts
Created August 17, 2021 16:56
use axios hook
import Axios from 'axios';
import { Dispatch, Reducer, useCallback, useReducer } from 'react';
interface IAxiosData<T> {
data?: T;
loading: boolean;
error?: Error;
}
enum UseFatchActions {
@rhogeranacleto
rhogeranacleto / index.html
Last active April 20, 2021 16:47
production intetration
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulario Integrado 2.0</title>
<style>
body {
padding: 50px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulario Integrado 2.0</title>
<style>
body {
padding: 50px;
}
@rhogeranacleto
rhogeranacleto / index.html
Last active January 6, 2022 21:34
integrated form
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulario Integrado 1.3.3</title>
<style>
body {
padding: 50px;
}
export PS1="> \[$(tput sgr0)\]\[\033[38;5;253m\]\A\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;7m\]@\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;166m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;32m\][\[$(tput sgr0)\]\[\033[38;5;38m\]\w\[$(tput sgr0)\]\[\033[38;5;32m\]]\[$(tput sgr0)\]\[\033[38;5;7m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
sudo docker volume create pg-volume
sudo docker run --name postgres -e POSTGRES_PASSWORD=node@1234 -e POSTGRES_USER=node -v pg-volume:/var/lib/postgresql/data -p 5432:5432 -d postgres:9.4.19
@rhogeranacleto
rhogeranacleto / table.sh
Last active January 30, 2018 19:01
Display a table with columns in shell
(
printf 'PID\tUSER\tAPPNAME\n'
printf '%s\t%s\t%s\n' "1" "john" "foo bar"
printf '%s\t%s\t%s\n' "12345678" "someone_with_a_long_name" "pop tart"
) | column -t -s $'\t'
# ref Patrick on https://unix.stackexchange.com/a/162916
@rhogeranacleto
rhogeranacleto / .vscode
Created January 9, 2018 19:26
vscode config
{
"editor.renderWhitespace": "all",
"editor.wordWrap": "on",
"editor.insertSpaces": false,
"editor.renderControlCharacters": false,
"editor.renderIndentGuides": true,
"editor.tabCompletion": true,
"editor.formatOnType": true,
"search.exclude": {
"**/.git/objects/**": true,
@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',