Skip to content

Instantly share code, notes, and snippets.

View VictorHugoBatista's full-sized avatar
🛰️
Floating in the cyberspace

Victor Hugo Batista VictorHugoBatista

🛰️
Floating in the cyberspace
  • banQi
  • Internet
View GitHub Profile
@PieterScheffers
PieterScheffers / install_forticlient_linux.sh
Created January 22, 2018 16:28
Install Forticlient on Linux
# install ubuntu in virtual machine
# https://ubuntuforums.org/showthread.php?t=1481300
# Get arch type of ubuntu
# i686 = 32 bit
# x86_64 = 64 bit
uname -m
# download forticlient
https://hadler.me/linux/forticlient-sslvpn-deb-packages
@PCreations
PCreations / rxjs-diagrams.md
Last active January 18, 2024 08:52
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@ba11b0y
ba11b0y / installing-postman.md
Last active August 31, 2023 19:21
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@keithweaver
keithweaver / s3-upload-via-form.php
Created July 18, 2017 11:33
Upload image using form submission to AWS S3 with PHP
<?php
// This file demonstrates file upload to an S3 bucket. This is for using file upload via a
// file compared to just having the link. If you are doing it via link, refer to this:
// https://gist.github.com/keithweaver/08c1ab13b0cc47d0b8528f4bc318b49a
//
// You must setup your bucket to have the proper permissions. To learn how to do this
// refer to:
// https://github.com/keithweaver/python-aws-s3
// https://www.youtube.com/watch?v=v33Kl-Kx30o
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 23, 2024 10:19
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@rafael-neri
rafael-neri / validar_cpf.php
Last active June 27, 2024 01:43
Validar CPF em PHP (Completo)
<?php
function validaCPF($cpf) {
// Extrai somente os números
$cpf = preg_replace( '/[^0-9]/is', '', $cpf );
// Verifica se foi informado todos os digitos corretamente
if (strlen($cpf) != 11) {
return false;
<?php
$args = array(
'label' => '', // Text in Label
'class' => '',
'style' => '',
'wrapper_class' => '',
'value' => '', // if empty, retrieved from post meta where id is the meta_key
'id' => '', // required
'name' => '', //name will set from id if empty
@badah
badah / git -package-release.txt
Created February 7, 2017 21:22
Git: make a zip package with modified files in release branch
git archive -o <repo.zip> HEAD $(git diff --name-only <release-branch> master)
@nciske
nciske / wpdb-transactions
Last active April 24, 2022 13:45 — forked from 5iDS/wpdb-transactions
MySQL database transaction, using the WordPress database object $wpdb. Requires the InnoDB table format.
<?php
global $wpdb;
// Start Transaction
$wpdb->query( "START TRANSACTION" );
// Do some expensive/related queries here
//$wpdb->query("DELETE FROM table WHERE form_id = '1' ");
//$wpdb->query("DELETE FROM data WHERE form_id = '1' ");
// set $error variable value in error handling after $wpdb modifications
@fjcunha
fjcunha / Validate_cpf_cnpj
Created September 27, 2016 15:41
jQuery validator methods to validate cpf and cnpj
jQuery.validator.addMethod("cnpj", function (value, element) {
var numeros, digitos, soma, i, resultado, pos, tamanho, digitos_iguais;
if (value.length == 0) {
return false;
}
value = value.replace(/\D+/g, '');
digitos_iguais = 1;