This file contains hidden or 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
CPF = "999.999.999-99", | |
CNPJ = "99.999.999/9999-99", | |
IE = "9?999999999999", | |
IM = "9?999999999999" /*Inscricao municipal*/, | |
RG = "99.99?9.99?9-*", | |
TIT = "999999999/99", | |
CEP = "99999-999", | |
DDD = "99", | |
Numero = "9?999999", /*Nota do leiloeiro*/ | |
NFE = "999.999.999", |
This file contains hidden or 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 get_youtube_channel_ID($url){ | |
$html = file_get_contents($url); | |
preg_match("'<meta itemprop=\"channelId\" content=\"(.*?)\"'si", $html, $match); | |
if($match && $match[1]); | |
return $match[1]; | |
} |
This file contains hidden or 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
/** | |
* Generates number of random geolocation points given a center and a radius. | |
* @param {Object} center A JS object with lat and lng attributes. | |
* @param {number} radius Radius in meters. | |
* @param {number} count Number of points to generate. | |
* @return {array} Array of Objects with lat and lng attributes. | |
*/ | |
function generateRandomPoints(center, radius, count) { | |
var points = []; | |
for (var i=0; i<count; i++) { |
This file contains hidden or 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
#!/bin/sh | |
mkdir /home/bitnami/backups/ | |
export BACKUP_FILE=/home/bitnami/backups/db-backup.sql.gz | |
export DATABASE_SCHEMA_NAME=--all-databases | |
export AZURE_CONTAINER=YOUR_VALUE_HERE | |
export AZURE_NAME=YOUR_VALUE_HERE | |
export AZURE_KEY=YOUR_VALUE_HERE | |
export AZURE_BLOB_NAME=db-production-$(date +%Y%m%d%H%M%S).sql.gz |
This file contains hidden or 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
// Create Base64 Object | |
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r |
This file contains hidden or 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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains hidden or 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
<ol> | |
<li> | |
<div class="fade-in one"> | |
<div class="box" style="background:#d10000;"></div> | |
</div> | |
</li> | |
<li> | |
<div class="fade-in two"> | |
<div class="box" style="background:#ff6622;"></div> |
This file contains hidden or 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 | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
// I blantantly stole, tweaked and happily used this code from: | |
// Lord of Ports http://www.experts-exchange.com/M_1736399.html | |
$ky = 'lkirwf897+22#bbtrm8814z5qq=498j5'; // 32 * 8 = 256 bit key | |
$iv = '741952hheeyy66#cs!9hjv887mxx7@8y'; // 32 * 8 = 256 bit iv |
This file contains hidden or 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
var cidades=[{"id":1,"nome":"Acrelandia","ide":1,"cap":0},{"id":2,"nome":"Assis Brasil","ide":1,"cap":0},{"id":3,"nome":"Brasileia","ide":1,"cap":0},{"id":4,"nome":"Bujari","ide":1,"cap":0},{"id":5,"nome":"Capixaba","ide":1,"cap":0},{"id":6,"nome":"Cruzeiro do Sul","ide":1,"cap":0},{"id":7,"nome":"Epitaciolandia","ide":1,"cap":0},{"id":8,"nome":"Feijo","ide":1,"cap":0},{"id":9,"nome":"Jordao","ide":1,"cap":0},{"id":10,"nome":"Mancio Lima","ide":1,"cap":0},{"id":11,"nome":"Manoel Urbano","ide":1,"cap":0},{"id":12,"nome":"Marechal Thaumaturgo","ide":1,"cap":0},{"id":13,"nome":"Placido de Castro","ide":1,"cap":0},{"id":14,"nome":"Porto Acre","ide":1,"cap":0},{"id":15,"nome":"Porto Walter","ide":1,"cap":0},{"id":16,"nome":"Rio Branco","ide":1,"cap":1},{"id":17,"nome":"Rodrigues Alves","ide":1,"cap":0},{"id":18,"nome":"Santa Rosa","ide":1,"cap":0},{"id":19,"nome":"Sena Madureira","ide":1,"cap":0},{"id":20,"nome":"Senador Guiomard","ide":1,"cap":0},{"id":21,"nome":"Tarauaca","ide":1,"cap":0},{"id":22,"nome":"Xapuri |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ |