Skip to content

Instantly share code, notes, and snippets.

Avatar
🚴
Hi!

Adi Fahmi adifahmi

🚴
Hi!
View GitHub Profile
@adifahmi
adifahmi / launch.json
Last active Feb 28, 2020
vscode setting & debugger for python example
View launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"type": "python",
@adifahmi
adifahmi / Docker cheatsheet
Created Apr 16, 2019
Some docker commands
View Docker cheatsheet
Build image from Dockerfile
docker build --pull --no-cache -t <IMAGE_NAME> .
Run image
docker run <IMAGE_NAME>
Stop container
docker stop <CONTAINER_ID>
List all container
@adifahmi
adifahmi / html_checker.py
Last active May 18, 2018
Python html tags checker, it checks if tags are properly closed, inspired from https://github.com/ryanpcmcquen/unclosedTagFinder
View html_checker.py
import re
import argparse
import urllib.parse
import urllib.request
htmlRegex = '<[^\!][^>]*>'
voidElementsRegex = '</?(?!area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta)'
openingTagRegex = '<[^/]'
closingTagRegex = '</'