Skip to content

Instantly share code, notes, and snippets.

@smzm
smzm / openvpn-resolver.md
Last active July 27, 2024 14:15
Replace IP adresses with domain in openvpn files

Prerequisites

  • ack
  • sed
  • dig

Install prerequisites

  • Arch : sudo pacman -S ack bind
  • Ubuntu : sudo apt install dnsutils ack sed
@smzm
smzm / fonts_in_linux.md
Created August 15, 2023 10:11
Font in linux

Install fonts

Copy fonts in ~/.fonts directory and then run:

fc-cache -fv

  • List all fonts installed :
@smzm
smzm / git_alias.md
Created January 4, 2024 11:02
Git Aliases

Alias for add, commit and push

  • Run in bash :
git config --global alias.cmp '!f() { git add -A && git commit -m "$@" && git push; }; f'
  • Now, You can use cmp command :
git cmp "my commit"
@smzm
smzm / UdemyCourseContent.py
Created July 17, 2024 08:58
Udemy Course Content Scraper
from playwright.sync_api import sync_playwright
UdemyCourse = "https://www.udemy.com/course/"
courseLable = input("Enter the course URL label: ")
with sync_playwright() as playwright:
browser = playwright.chromium.launch(headless=True)
context = browser.new_context()
page = context.new_page()
page.goto(UdemyCourse + courseLable)