Skip to content

Instantly share code, notes, and snippets.

@bcamargogui
bcamargogui / gist:5eb6519747a2ac6bb0cc613d0c921bd0
Last active April 2, 2018 12:44 — forked from michelbrito/gist:1083205
Lista de estados em HTML
<select>
<option value="">Selecione seu estado</option>
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espirito Santo</option>
@bcamargogui
bcamargogui / LumenGetStarted.md
Last active April 12, 2018 01:18
Lumen - Quick Start | Building a simple Application

Lumen - Quick Start

Install

Structure

Concepts


@bcamargogui
bcamargogui / .htaccess
Created April 30, 2018 13:37
Catch all requests and redirect to React main file - HTACCESS
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
.div-iframe {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.div-iframe iframe {
position: absolute;
top: 0;
left: 0;
<?php
$str_conn="firebird:host=localhost;dbname=/var/lib/firebird/2.5/data/employee.fdb;charset=UTF8";
$dbh = new PDO($str_conn, "sysdba", "masterkey");
?>
@bcamargogui
bcamargogui / postman_install.sh
Created September 10, 2018 15:01 — forked from posemon/postman_install.sh
Postman install Ubuntu 18.04
#!/bin/bash
# Get postman app
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
#Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
@bcamargogui
bcamargogui / install_oci8_ubuntu_16.04_php7.1.md
Created January 9, 2019 10:57 — forked from hewerthomn/install_oci8_ubuntu_16.04_php7.1.md
How to install OCI8 on Ubuntu 16.04 and PHP 7.1
@bcamargogui
bcamargogui / gist:dd5e263421d886ab84df4de429443167
Created January 14, 2019 10:36
Install Citrix Receiver on Ubuntu 18.04 LTS
Download on https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-latest.html
If you got a problem seem like this: "Cannot connect 0.0.0.2", try bellow
# cd /opt/Citrix/ICAClient/keystore/
# mv cacerts cacerts.old
# ln -s /etc/ssl/certs cacerts
# /opt/Citrix/ICAClient/util/ctx_rehash
@bcamargogui
bcamargogui / autoLike.js
Created October 5, 2019 05:23
tinder like almost everyone trick
// High variables
const interval = 500
const qsLike = '[aria-label="Like"]'
const qsUnlike = '[aria-label="Nope"]'
const qsOpenCard = '.recCard'
const qsBioBox = '.profileCard__bio'
// Statistics
var liked = 0
var unliked = 0
function getStringPermutation(letters = '') {
const lettersLength = letters.length;
// not able to permut
if (lettersLength < 2) return letters;
// break letters to array
const lettersParts = letters.split('');
// only option to permut
if (lettersLength === 2) {
// reverse letters order string
const reversedLetters = lettersParts.reverse().join('');