Skip to content

Instantly share code, notes, and snippets.

View lucianmachado's full-sized avatar
:octocat:

Lucian lucianmachado

:octocat:
  • 09:42 (UTC -03:00)
View GitHub Profile
@lucianmachado
lucianmachado / polling.js
Created January 11, 2023 18:06 — forked from ivan-marquez/polling.js
Long polling implementation in Js
const axios = require('axios').default;
function getAPIClient() {
const axiosConfig = {
baseURL: 'https://csrng.net/csrng/csrng.php',
timeout: 5000,
};
return axios.create(axiosConfig);
}
# Install these packages (use your favorite AUR tool here)
yay -S minikube-bin kubectl-bin docker-machine-driver-kvm2 libvirt qemu-headless docker-machine ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default
@lucianmachado
lucianmachado / RESTdoc
Created February 6, 2019 03:06 — forked from coderofsalvation/RESTdoc
Quickndirty bash-utility to generate REST-documentation from sourcecode comments into css-styles html (or plainhtml). Can be handy for inclusion into phpdoc/phpdoctor/doxygen-dochains, instead of using heavyweight alternatives.
#!/bin/bash
#
# A quickndirty bash-utility to generate REST-documentation from sourcecode comments.
# (initially aimed at php-files, but js should also work)
# Basically its a c-style comment -> markdown -> html converter
# Dependancies:
# - awk
# - sed
# - bash
# - php
@lucianmachado
lucianmachado / webtail.py
Created September 12, 2018 16:25 — forked from Henningstone/webtail.py
HTTP server that provides a web interface to run "tail" on a file, like the Unix command
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
HTTP server that provides a web interface to run "tail" on a file,
like the Unix command.
This is a standalone script. No external dependencies required.
How to invoke:
@lucianmachado
lucianmachado / gist:1586fa1313316d5d56926413eaa130fa
Created May 22, 2017 18:52 — forked from danielbaccin/gist:2499371
comando uteis para config do oracle
Comandos uteis do oracle para obter configiurações:
Parâmetros da NLS:
=> Select * from nls_database_parameters
=> Select * from nls_session_parameters
=> Select * from nls_instance_parameters
Exibe os valores de database_parameters
=> SELECT name,value$ from sys.props$ where name like '%NLS_LANG%'
=> SELECT name,value$ from sys.props$ where name like '%NLS_CHAR%'
=> SELECT name,value$ from sys.props$ where name like '%_CHARACTER%'
@lucianmachado
lucianmachado / wildfly-toolbelt.md
Created May 11, 2016 04:44 — forked from sebastianwebber/wildfly-toolbelt.md
Wildfly administration tips

#Wildfly Toolbelt

Deploy Related

Find domain deployments in filesystem

Basically, you need to open domain.xml under WILDFLY_HOME/domain/configuration and find the <deployments> session. In that session, each deployment contain a <content> tag. The attribute sha1 contains details where the file is storaged on the filesystem. EG:

<deployments>
 
#!/bin/bash
# ----------------------------------------------------------------------------
# Gerador e Validador de CPF em Shell Script (Bash)
#
# Uso: cpf [cpf]
# Ex.: cpf 552.056.731-09 # pode utilizar assim
# cpf 55205673109 # pode utilizar assim
# cpf # gera um CPF válido
#
# Autor: Marcos da B. M. Oliveira , http://www.terminalroot.com.br/
@lucianmachado
lucianmachado / 0_reuse_code.js
Created November 26, 2015 17:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console