Source : Learn to combine RxJs sequences with super intuitive interactive diagrams
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
tar -xzf Postman-linux-x64-5.3.2.tar.gz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git archive -o <repo.zip> HEAD $(git diff --name-only <release-branch> master) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
NewerOlder