Skip to content

Instantly share code, notes, and snippets.

@adifahmi
adifahmi / launch.json
Last active February 28, 2020 09:27
vscode setting & debugger for python example
{
// 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 April 16, 2019 05:12
Some docker commands
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 12:20
Python html tags checker, it checks if tags are properly closed, inspired from https://github.com/ryanpcmcquen/unclosedTagFinder
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 = '</'