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 / estlint.config.mjs
Last active May 7, 2025 15:56
Base vite configuration files
import globals from 'globals'
import eslint from '@eslint/js'
import eslintPluginVue from 'eslint-plugin-vue'
import typescriptEslint from 'typescript-eslint'
import stylistic from '@stylistic/eslint-plugin'
export default typescriptEslint.config(
{
ignores: [
'*.d.ts',
@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
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 / 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"]
@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 / django_base_html_page.html
Last active August 19, 2020 20:35
Base HTML page for Django from which all other pages can extend. Includes all SEO tags, Analytics, bootstrap, Lodash, JQuery and VueJS
{% load static %}
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{% block title %}{% endblock %}</title>
@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
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
import argparse
import os
import threading
import time
from urllib import parse
import requests
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
@Zadigo
Zadigo / nginxproxy.md
Created May 30, 2020 11:12 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers