Command: heroku pg:backups capture -a [app_name]
Command: curl -o latest.dump `heroku pg:backups public-url -a [app_name]`
<?php | |
abstract class CSRF | |
{ | |
const SESSION_NAME = 'nomedosite_csrf_token'; | |
const FIELD_NAME = 'nomedosite_csrf_check'; | |
private static function set_session() | |
{ | |
if (!isset($_SESSION[self::SESSION_NAME])) |
<?php | |
function validar_cpf($cpf) | |
{ | |
$cpf = preg_replace('/[^0-9]/', '', (string) $cpf); | |
// Valida tamanho | |
if (strlen($cpf) != 11) | |
return false; |
<?php | |
function validar_cnpj($cnpj) | |
{ | |
$cnpj = preg_replace('/[^0-9]/', '', (string) $cnpj); | |
// Valida tamanho | |
if (strlen($cnpj) != 14) | |
return false; |
<?php | |
function cep_dados($cep) | |
{ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://www.buscacep.correios.com.br/servicos/dnec/consultaLogradouroAction.do'); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_POST, true); |
var arr = {"0:0":"ffffff","0:1":"ffffff","0:2":"ffffff","0:3":"ffffff","0:4":"ffffff","0:5":"ffffff","0:6":"ffffff","0:7":"ffffff","0:8":"ffffff","0:9":"ffffff","0:10":"ffffff","0:11":"ffffff","0:12":"ffffff","0:13":"ffffff","0:14":"ffffff","0:15":"ffffff","0:16":"ffffff","0:17":"ffffff","0:18":"ffffff","0:19":"ffffff","0:20":"ffffff","0:21":"ffffff","0:22":"ffffff","0:23":"ffffff","0:24":"ffffff","0:25":"ffffff","0:26":"ffffff","0:27":"ffffff","0:28":"ffffff","0:29":"ffffff","0:30":"ffffff","0:31":"ffffff","0:32":"ffffff","0:33":"ffffff","0:34":"ffffff","0:35":"ffffff","0:36":"ffffff","0:37":"ffffff","0:38":"ffffff","0:39":"ffffff","0:40":"fffeff","0:41":"fffeff","0:42":"ffffff","0:43":"ffffff","0:44":"ffffff","0:45":"fffeff","0:46":"fffeff","0:47":"fffeff","0:48":"ffffff","0:49":"fffdff","0:50":"f9f5f2","0:51":"cfbda7","1:0":"ffffff","1:1":"ffffff","1:2":"ffffff","1:3":"ffffff","1:4":"ffffff","1:5":"ffffff","1:6":"ffffff","1:7":"ffffff","1:8":"ffffff","1:9":"ffffff","1:10":"ffffff","1:11":"ffffff","1:12":"f |
# EditorConfig helps developers define and maintain consistent | |
# coding styles between different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
# Change these settings to your own preference |
arr=[] | |
len=4 | |
for (sub=0; sub<=0; sub++) { | |
for (i = 0; i < Math.pow(2,len); i++) { | |
for (j = 0; j < Math.pow(2,len); j++) { | |
let obj = { | |
sub: sub, | |
a: i.toString(2).padStart(len,'0'), | |
b: j.toString(2).padStart(len,'0'), |
Bash
for file in prefix*; do mv "$file" "${file#prefix}"; done;
The for loop iterates over all files with the prefix. The do removes from all those files iterated over the prefix.
Here is an example to remove "bla_" form the following files:
bla_1.txt
bla_2.txt