Skip to content

Instantly share code, notes, and snippets.

View Zadigo's full-sized avatar
🌴
On vacation

John PENDENQUE Zadigo

🌴
On vacation
View GitHub Profile
@Zadigo
Zadigo / DynamicBorders.bas
Created October 25, 2017 18:08
Create table borders anywhere in Excel
Sub create_Table_BordersAnywhere()
'Get current range selected
Dim current_Selection As Range
Set current_Selection = Selection
'Set in range
Dim create_Table As Range
Set create_Table = Range(current_Selection.Address)
Dim elements(5) As String
@Zadigo
Zadigo / DynamicMacroShapes.bas
Last active October 25, 2017 18:15
Assigning a macro to any given shape in Excel
Option Explicit
Sub assign_MacroToShape()
'
' This macro assigns a macro to a given shape
'
'Set variables
Dim active_Book As Workbook
Set active_Book = ActiveWorkbook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import argparse
import os
import threading
import time
from urllib import parse
import requests
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
This file has been truncated, but you can view the full file.
# Top 20K hashes from the Troy Hunt / haveibeenpwned Pwned Passwords list v2 (2018-02-21)
# Original raw as published is at https://gist.github.com/roycewilliams/eef06c1148707ce8c8a1dea85768b207
20760336:7c4a8d09ca3762af61e59520943dc26494f8941b:123456
7016669:f7c3bc1d808e04732adf679965ccc34ca7ae3441:123456789
3599486:b1b3773a05c0ed0176787a4f1574ff0075f7521e:qwerty
3303003:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8:password
2900049:3d4f2bf07dc1be38b20cd6e46949a1071f9d0e3d:111111
2680521:7c222fb2927d828af22f592134e8932480637c0d:12345678
2670319:6367c48dd193d56ea7b0baad25b19455e529f5ee:abc123
2310111:e38ad214943daad1d64c102faec29de4afe9da3d:password1
@Zadigo
Zadigo / conditional_lists.vb
Created August 19, 2020 19:14
Populates a dropdown list automatically based on the option button that a user has clicked in the form
Dim wk As Worksheet
Private Sub UserForm_Initialize()
' 1. Create a list of items to populate the list with
' when the user opens the form
Me.ComboBox1.AddItem "Kendall Jenner", 0
Me.ComboBox1.AddItem "Kylie Jenner", 1
Me.ComboBox1.AddItem "Kim Kardashian", 2
Me.OptionButton1.Value = True
@Zadigo
Zadigo / countries.json
Created April 21, 2022 21:48 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@Zadigo
Zadigo / html-tags.json
Last active January 17, 2023 21:16 — forked from cecchi/html-tags.json
["html","base","head","style","title","address","article","footer","header","h1","h2","h3","h4","h5","h6","hgroup","nav","section","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","area","audio","map","track","video","embed","object","param","source","canvas","noscript","script","del","ins","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","button","datalist","fieldset","form","input","keygen","label","legend","meter","optgroup","option","output","progress","select","details","dialog","menu","menuitem","summary","content","element","shadow","template","acronym","applet","basefont","big","blink","center","dir","frame","frameset","isindex","listing","noembed","plaintext","spacer","strike","tt","xmp","body","a","textarea","svg","plygon","path","img","link"]
export function useDebounce() {
function debounce<T extends (...args: any[]) => void>(func: T, wait: number, immediate: boolean = false) {
let timeout: ReturnType<typeof setTimeout> | null = null
// return function (this: any, ...callbackArgs: Parameters<T>) {
return function (...callbackArgs: Parameters<T>) {
// const context = this
function later() {
timeout = null
@Zadigo
Zadigo / advanced_leveinstein_calculator.py
Last active February 3, 2025 15:40
A simple Python module that calculates the distance between two words
import re
from difflib import SequenceMatcher
import random
import Levenshtein
from rapidfuzz import fuzz, process
from thefuzz import fuzz as thefuzz
import pandas
from unidecode import unidecode
# https://www.datacamp.com/tutorial/fuzzy-string-python