Skip to content

Instantly share code, notes, and snippets.

View JakubAndrysek's full-sized avatar

Kuba Andrýsek JakubAndrysek

View GitHub Profile
@timotif
timotif / 00_multipass_for_dummies.txt
Last active March 9, 2024 13:04
Ubuntu on Mac Silicon for dummies: a guide to Multipass for 42 Linux campuses
# Install Homebrew (https://brew.sh/)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install multipass via homebrew
brew install --cask multipass
# Create a Multipass VM instance
# 'jammy' is Ubuntu 22.04LTS.
# Please note that the alias cannot start with a number so '42berlin' is not valid
# Default username is ubuntu: you can use your Linux skills to create a different one later on if you want
@JakubAndrysek
JakubAndrysek / ValidateLinksScraping.py
Last active May 24, 2023 21:33
This script will scrape a website and save all the paths to a file.
# Description: This script will scrape a website and save all the paths to a file.
# Usage: It will also exclude any paths that end with the extensions specified in the --exclude-extensions parameter.
# It will also limit the number of links to visit per page to the number specified in the --max_links_per_page parameter.
# It could be used to test a website for broken links.
# Be careful not to overload the website with requests. You could get banned.
# Example: python ValidateLinksScraping.py https://webscraper.io/test-sites --max_links_per_page 100 --exclude-extensions pdf,jpg,png
# Author: Kuba Andrysek
# Website: https://kubaandrysek.com
# Date: 2023-05-34
@burak-kara
burak-kara / reset.gs
Last active June 6, 2024 10:04
Google Drive - Remove Sharing & Access Permissions from folders, subfolders and files. Note that Google Apps Script commands can be changed after this version.
// Note that this script will remove all permissions of all files and subfolders
// (including files in subfolders) of the given folder
// https://drive.google.com/drive/folders/abcdefgh
const id = "abcdefgh";
function start() {
const folder = DriveApp.getFolderById(id);
getSubFolders(folder);
// At the end, reset for parent folder
@jiffyclub
jiffyclub / markdown_doc
Last active August 1, 2023 11:16
This script turns Markdown into HTML using the Python markdown library and wraps the result in a complete HTML document with default Bootstrap styling so that it's immediately printable. Requires the python libraries jinja2, markdown, and mdx_smartypants.
#!/usr/bin/env python
import argparse
import sys
import jinja2
import markdown
TEMPLATE = """<!DOCTYPE html>
<html>