Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

José Leonan S. Carvalho LeonanCarvalho

🏠
Working from home
View GitHub Profile
@LeonanCarvalho
LeonanCarvalho / Task.js
Last active Mar 12, 2021
Simple demonstration how to use Workers on electron main process
View Task.js
//Task.js
const path = require('path');
const fs = require('fs');
const { Worker } = require('worker_threads')
function checkFileHashTask(files, cwd = "./", hashType = 'md5', msgHandler){
return new Promise((resolve, reject) => {
const workerData = {cwd: cwd, files:files,hashType:hashType};
@LeonanCarvalho
LeonanCarvalho / POST.json
Created Sep 24, 2020
Kepler Payload (Upload)
View POST.json
This file has been truncated, but you can view the full file.
@LeonanCarvalho
LeonanCarvalho / hidronf.json
Created Jul 29, 2020
Bacia Hidrográfica Nova Friburgo
View hidronf.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeonanCarvalho
LeonanCarvalho / hidronf.json
Created Jul 29, 2020
Bacia Hidrográfica Nova Friburgo
View hidronf.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View prsnippet.java
//FROM gameserver/server.jar!/l2/gameserver/network/l2/c2s/CharacterSelected.class
protected void runImpl() {
//...
if (Config.ALT_LIMIT_HWID_WINDOW != 0 && !StringUtils.isEmpty(var1.getHwid())) {
//You could simple check if the account is premium and byypass here...
int hwidCount = 0;
Iterator AllPlayers = GameObjectsStorage.getAllPlayersForIterate().iterator();
while(AllPlayers.hasNext()) {
Player tPlayer = (Player)AllPlayers.next();
@LeonanCarvalho
LeonanCarvalho / ip_block.txt
Last active Jul 5, 2019
L2j DDoS Servers List
View ip_block.txt
netsh advfirewall firewall add rule name="IP Block AmericaNorte" dir=in interface=any action=block remoteip=104.129.192.0/20,104.131.0.0/16,104.154.0.0/15,104.196.0.0/14,104.232.128.0/19,104.236.0.0/16,104.237.0.0/20,104.237.128.0/19,104.244.72.0/21,104.245.68.0/22,104.248.0.0/16,104.32.0.0/14,104.40.0.0/13,107.170.0.0/16,107.172.0.0/14,107.191.32.0/19,107.191.96.0/19,108.184.0.0/15,108.58.0.0/16,12.125.0.0/16,128.199.0.0/16,134.209.0.0/16,138.197.0.0/16,138.68.0.0/16,139.59.0.0/16,142.93.0.0/16,146.185.144.0/21,159.65.0.0/16,162.243.0.0/16,162.244.80.0/22,165.227.0.0/16,167.99.0.0/16,178.128.0.0/20,178.128.144.0/20,178.128.192.0/20,184.104.0.0/15,184.154.0.0/16,188.166.224.0/20,189.224.0.0/12,198.108.0.0/14,198.199.64.0/18,206.189.0.0/16,208.157.144.0/21,209.97.128.0/18,216.218.128.0/17,24.159.0.0/16,24.30.0.0/18,24.30.64.0/19,37.139.8.0/20,45.55.0.0/16,46.101.128.0/17,68.183.0.0/16,75.146.48.0/20,76.96.0.0/17,96.64.0.0/19,97.72.0.0/15,97.75.64.0/18,98.0.0.0/12,98.160.0.0/11
netsh advfirewall firewall add ru
View form.php
<?php
/**
* Created by PhpStorm.
* User: Leonan Carvalho
* Date: 02/07/2019
* Time: 10:44
*/
//Valida se o método é post e se na requisição há o token do recaptcha
if ($_SERVER['REQUEST_METHOD'] === 'POST' && array_key_exists("g-recaptcha-response", $_REQUEST)) {
View teste_points.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeonanCarvalho
LeonanCarvalho / ckan.service
Created Feb 21, 2018
systemd ckan service
View ckan.service
[Unit]
Description=CKAN Service
Requires=solr.service postgresql.service
After=solr.service postgresql.service
[Service]
User=ckan
Group=ckan
Type=forking
TimeoutSec=0
View AbstractSoapClient.php
<?php
namespace Application\WebServices;
/**
*
* @author LeonanCarvalho <j.leonancarvalho@gmail.com>
*/
abstract class AbstractSoapClient {