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 | |
sudo apt-get update && apt-get upgrade | |
sudo apt-get install php | |
sudo apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php | |
EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)" | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" |
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
function str_replace_last(search, replace, str){ | |
let pos = str.lastIndexOf('webp'); | |
let search_length; | |
if(pos != -1){ | |
search_length = search.length; | |
str = str.substring(0, pos)+replace+str.substring(pos+search_length); | |
} | |
return str; | |
} |
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 | |
//antes de trabalhar com essa classe, certifique-se de ativar a extensão gd do php | |
//fiz essa classe a fim de testar formas pra tratar imagem usando php | |
//porem existe bibliotecas bem elaboradas para esses fim.. | |
// https://github.com/gumlet/php-image-resize | |
// http://image.intervention.io/ | |
class Img | |
{ | |
private function redimensionar($path, $fileName = "", $width, $height, $proportionDirection, $thumbnailPath) | |
{ |
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
----- BEGIN LICENSE ----- | |
Member J2TeaM | |
Single User License | |
EA7E-1011316 | |
D7DA350E 1B8B0760 972F8B60 F3E64036 | |
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD | |
FA0A2ABE 25F65BD8 D51458E5 3923CE80 | |
87428428 79079A01 AA69F319 A1AF29A4 | |
A684C2DC 0B1583D4 19CBD290 217618CD | |
5653E0A0 BACE3948 BB2EE45E 422D2C87 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas] | |
@="Abrir o prompt de comando(Admin) aqui" | |
"Extended"="" | |
"Icon"="cmd.exe" | |
"NeverDefault"="" | |
"NoWorkingDirectory"="" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command] |
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
const https = require('https') | |
let getRequest = (url, path) => new Promise((resolve, reject)=>{ | |
const options = { | |
hostname: url, | |
port: 443, | |
path: path, | |
method: 'GET', | |
headers: { | |
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36' |
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 | |
if(isset($_POST['telphone'])){ | |
$re = '/\(?\d{2}\)?\s?\d{4,5}[-?|\s?]?\d{4}/m'; | |
preg_match_all($re, $_POST['telphone'], $matches, PREG_SET_ORDER, 0); | |
if($matches != null){ | |
echo "<h2 style=\"color: white;\">Parabéns Numero Validado Com Sucesso!</h2>"; | |
echo "<h3>".$matches[0][0]."</h3>"; | |
$novo_numero = str_replace("(", "", $matches[0][0]); | |
$novo_numero = str_replace(")", "", $novo_numero); | |
$novo_numero = str_replace("-", "", $novo_numero); |
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
//check if request header exists | |
bool isLanguage = this.Request.Headers.ContainsKey("Accept-Language1"); | |
string lang = this.Request.Headers["Accept-Language"]; | |
//string h = return string.Join("\n", this.Request.Headers.Select(x => $"{x.Key}: {x.Value}")); | |
//Middleware | |
public string tt([FromHeader(Name = "X-Forwarded-For")] string remoteIP) { | |
Console.WriteLine(remoteIP); |
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
#include <cstdint> | |
#include <iostream> | |
#include <memory> | |
#include <string> | |
#include <curl/curl.h> | |
#include <json/json.h> | |
namespace | |
{ |
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
#include <windows.h> | |
#include <stdio.h> | |
#define INITIAL_BUFFER (MAX_PATH * 5) | |
char *listAllDirectories(char *path) { | |
WIN32_FIND_DATA data; | |
size_t bufferSize = INITIAL_BUFFER; | |
char *directories = (char*)calloc(1, bufferSize); | |
char *buffer = directories; |