Skip to content

Instantly share code, notes, and snippets.

View maxdemaio's full-sized avatar
🥐

Maxwell DeMaio maxdemaio

🥐
View GitHub Profile
@maxdemaio
maxdemaio / unless.py
Last active December 1, 2023 02:05
unless?
#!/usr/bin/env python3
import sys
if __name__ == "__main__":
if len(sys.argv) > 1:
unless = sys.argv[1]
for i in range(0, 10):
print(" " * i * 2 + f"- {unless}")
for i in range (9, -1, -1):
@maxdemaio
maxdemaio / bookmarks.py
Last active September 9, 2023 02:27
bookmark links extract
import re
# Replace html_content with your HTML content
# This is the HTML format of the exported bookmarks
html_content = """
<DT><H3 ADD_DATE="1664237946" LAST_MODIFIED="1693619091">Portfolio Inspo</H3>
<DL><p>
<DT><A HREF="https://ddiu.io/" ADD_DATE="1664237973">Diu</A>
<DT><A HREF="https://www.cnblogs.com/okup" ADD_DATE="1664238125">Gonfei - 博客园</A>
</DL></p>
@maxdemaio
maxdemaio / froakie.txt
Last active August 31, 2023 03:27
👀
⬜⬜⬜⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬛🟦🟨🟦⬛⬜⬜⬛⬛⬛⬜⬜⬜⬜⬜
⬜⬜⬜⬛🟨🟨🟦🟦⬛⬛🟨🟦🟦⬛⬜⬜⬜⬜
⬜⬜⬜⬛🟨⬛🟦🟦⬛🟨🟨🟨🟦⬛⬜⬜⬜⬜
⬜⬜⬛⬛🟨⬛🟦🟦⬛🟨⬛🟨🟦⬛⬛⬛⬜⬜
⬜⬛🟦🟦🟦🟨🟦🟦⬛🟨⬛🟨🟦⬛⬜⬜⬛⬜
⬜⬛🟦⬜⬜🟦🟦🟦🟦🟨🟨🟨🟦⬛⬜⬜⬜⬛
⬜⬜⬛⬜⬜🌫️⬜⬜🟦🟦🟨🟦🟦🟦⬛⬜⬜⬛
⬜⬜⬛⬛🟦🟦⬜⬜🟦🟦🟦🟦🟦🟦⬛⬜🌫️⬛
⬜⬜⬜⬛⬛⬛🟦🟦🟦🟦🟦⬛⬛⬛🌫️⬛⬛⬜
@maxdemaio
maxdemaio / fonts.md
Last active June 18, 2024 23:34
fonts I like (grouped)
@maxdemaio
maxdemaio / duration.py
Last active July 17, 2023 12:43
Generate the Reading Time of a Markdown File/Directory
import sys
import os
import re
average_reading_speed = 200 # Adjust as needed
# Step 1: Get the path from command line argument
if len(sys.argv) < 2:
print("Please provide the file or directory path as a command line argument.")
sys.exit(1)
:.. :: * ;;...
* .. ;: *
...; create... __
' ... **
* :; ' ..;; *
@maxdemaio
maxdemaio / SJV.ps1
Created July 5, 2022 20:51
Switch JDK Versions
<#
Create a file named SJV.ps1 with all of the contents of this file.
Open a new powershell window and type "& [path to this file] 17" to switch to Java 17.
Type "& [path to this file] 8" OR "& [path to this file]" to switch to Java 8.
Note: update paths according to your own machine.
You also may need to set an execution policy before running powershell scripts.
#>
if ($args[0] -eq "17") {
@maxdemaio
maxdemaio / pom.xml
Created January 29, 2022 15:32 — forked from timmolderez/pom.xml
Adding dependencies to local .jar files in pom.xml
If you'd like to use a .jar file in your project, but it's not available in any Maven repository,
you can get around this by creating your own local repository. This is done as follows:
1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag):
<repositories>
<repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/libs</url>
@maxdemaio
maxdemaio / tableHtmltoJira.js
Last active January 28, 2022 17:03
Given a table id attribute, this script will convert said table into Jira table format
// Quick and simple export target #table_id into a jiraTable
function download_table_as_jiraTable(
table_id,
separator = "|",
headerSeparator = "||"
) {
// Select rows from table_id
var rows = document.querySelectorAll("table#" + table_id + " tr");
// Construct jiraTable
var jiraTable = [];
@maxdemaio
maxdemaio / exampleHtmlToCsv.html
Last active January 27, 2022 16:38
Exports a given HTML table to CSV format when passed its string id attribute as a parameter. Example: download_table_as_csv("myTable")
<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}