Skip to content

Instantly share code, notes, and snippets.

View maxjf1's full-sized avatar
🏠
Working from home

Maxwell maxjf1

🏠
Working from home
  • UFJF
  • Juiz de Fora, Minas Gerais - Brazil
View GitHub Profile
@maxjf1
maxjf1 / fix.sh
Created December 8, 2021 00:14
Windows time fix
Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_QWORD /d 1
@maxjf1
maxjf1 / CRUD.js
Last active January 5, 2021 01:47
Simple JavaScript Storage / Crud simulation Class
/**
* Simple CRUD for learning
*/
class CRUD {
/** LocalStorage prefix */
prefix = 'crud_'
/** Default timeout simulating AJAX */
timeout = 200
/**
@maxjf1
maxjf1 / OCR.sh
Created June 12, 2020 20:22
OCR to clipboard script for ubuntu
#!/bin/bash
# Dependencies: tesseract-ocr
SCR_IMG=`mktemp`
trap "rm $SCR_IMG*" EXIT
gnome-screenshot -a -f $SCR_IMG.png
# increase quality with option -q from default 75 to 100
# Typo "$SCR_IMG.png000" does not continue with same name.
@maxjf1
maxjf1 / docker-compose.yml
Last active May 21, 2020 20:54
Docker Compose for WordPress Development
version: "3.1"
services:
wordpress:
image: wordpress
restart: unless-stopped
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
@maxjf1
maxjf1 / maxwell_souza.asc
Created September 27, 2019 00:43
Public ASC key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBF2NWc0BDADDPX+1ASXKfE5TA/7Ue0b+AMZlc4vbkxfUPam1vTM6qfakxMps
TgIm5I132gsI+klyTxWSLe3ns7viUXIlTj2E93mttH8VRdE0X1jbmQs9Cjmrd56F
2/OcGjeoumF5R0c6XN68rXGXTNz+uQ9p2tWWr6xLIWTQOEMBKSuBJSj1/yL00zxA
AHYrpYzaQniX0gyP04Fs9ABuIbdu7hYC/FsO5mxB4h+KSNkRQa1jcp7JsnOQ2rjn
lEf1Zcbazt7Vunqf7b7PpWDoGcbIOhxLFX7o0qG56UR26g1Sm95Ton0AxM/46sLY
7cIWbCJdxyvjT7rkQesjDDml3qKtdOsIsdmfzDbgjki+HpEm/9Vie+OV39GsKLBw
4SC5LwMOdIYXtmHhFqgugLF1EknDkXIQIGiabc1x6DKjUibgbOTIxsO68X5heDHT
XiOzvl/6xdfvzY4dtcHhnXA5Gva16tJPBPLQex9oT6o+bZ2wexIjZHL3SFMgmSjX
@maxjf1
maxjf1 / algoritmo-dh.js
Created September 18, 2019 01:29
Exercicios Segurança
const pAlice = 6, // Chave privada Alice
pBob = 5, // Chave privada Bob
primo = 23,
a = 8;
// chaves secretas compartilhadas
let kBob, kAlice;
function main() {
const compBob = gerarChaveCompartilhada(primo, pBob, a);
@maxjf1
maxjf1 / trabalho2.ipynb
Last active September 24, 2018 07:15
Trabalho Recuperação de informação
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxjf1
maxjf1 / firewall_proativo.py
Created April 25, 2018 06:12
Firewalls POX Python
from pox.core import core
import pox.openflow.libopenflow_01 as of
from pox.lib.util import dpidToStr
from pox.lib.addresses import IPAddr, EthAddr
log = core.getLogger()
def _handle_connectionUp(event):
msg = of.ofp_flow_mod()
msg.match.dl_type = 0x800
//inspirado em https://gist.github.com/pabloprogramador/6331013 (php)
/**
* remove todos os digitos que não são numeros
* @param string/int
* @return bool
*/
function parse_number(val) {
val = (val || '') + '';
return val.replace(/\D/g, "");
www