Examples for how to create your own info panel, warning box and other decent looking notification in GitHub markdown.
All the boxes are single/two cell tables or two row tables.
| ❗ You have to read about this |
|---|
| from datetime import datetime | |
| def get_current_week(): | |
| current_date = datetime.now() | |
| current_week = current_date.isocalendar()[1] | |
| print(f"Current week of the year: {current_week}") | |
| if __name__ == "__main__": | |
| get_current_week() |
| #!/bin/bash | |
| # On the 'donor' machine, boot a live linux ISO (Ubuntu or whatever) | |
| # and connect it to the internet. Then run these commands, which will | |
| # dump the contents to sprunge.us so you can retrieve them easily. Or | |
| # copy them manually, whatever. | |
| mkdir -p /tmp/MSDM | |
| cd /tmp/MSDM | |
| for f in SLIC MSDM; do |
| /********* Sample code generated by the curl command line tool ********** | |
| * All curl_easy_setopt() options are documented at: | |
| * https://curl.se/libcurl/c/curl_easy_setopt.html | |
| ************************************************************************/ | |
| // Pick up Hackaday home page | |
| #include <curl/curl.h> | |
| # Note: for this to do anything, use my starter Dockerfile config (https://gist.github.com/arctic-hen7/10987790b86360820e2790650e289f0b) | |
| # This file contains ZSH configuration for your shell when you interact with a container | |
| # (we wouldn't want any boring `sh` now would we?) | |
| # Please feel free to set up your own ZSH config in here! | |
| # It gets mapped to your `.zshrc` for the root user in the container | |
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. |
Percentage:
<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>
Pixels:
<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">
| <domain type='kvm' id='254'> | |
| <name>PE-1-SR</name> | |
| <uuid>af76b9d5-8bab-4156-b013-ec00968117f9</uuid> | |
| <description>Timos VM</description> | |
| <memory unit='GiB'>6</memory> | |
| <currentMemory unit='GiB'>6</currentMemory> | |
| <vcpu placement='static'>2</vcpu> | |
| <resource> | |
| <partition>/machine</partition> | |
| </resource> |
| import time | |
| from random import randrange | |
| from multiprocessing.pool import ThreadPool | |
| from tqdm import tqdm | |
| def func_call(position, total): | |
| text = 'progressbar #{position}'.format(position=position) |
_RunAs.Admin-Explorer.C:\Windows\System32\runas.exe /noprofile /user:<domain>\<username> "c:\windows\explorer.exe /separate"