Skip to content

Instantly share code, notes, and snippets.

View crisidev's full-sized avatar
🦀

Matteo Bigoi crisidev

🦀
View GitHub Profile
@crisidev
crisidev / goto.py
Created May 5, 2020 14:05 — forked from georgexsh/goto.py
python goto with system trace function
import sys
def j(lineno):
frame = sys._getframe().f_back
called_from = frame
def hook(frame, event, arg):
if event == 'line' and frame == called_from:
try:
frame.f_lineno = lineno
@crisidev
crisidev / goto.py
Created May 5, 2020 14:05 — forked from georgexsh/goto.py
python goto with system trace function
import sys
def j(lineno):
frame = sys._getframe().f_back
called_from = frame
def hook(frame, event, arg):
if event == 'line' and frame == called_from:
try:
frame.f_lineno = lineno
@crisidev
crisidev / access.lua
Created May 14, 2018 14:47 — forked from mariocesar/access.lua
Nginx Lua script redis based for Basic user authentication
function password_encode(password)
local bcrypt = require 'bcrypt'
return bcrypt.digest(password, 12)
end
function check_password(password, encoded_password)
local bcrypt = require 'bcrypt'
return bcrypt.verify(password, encoded_password)
end