Skip to content

Instantly share code, notes, and snippets.

from os import system
import shutil
import telegram
def get_disk_free_space(path):
usage = shutil.disk_usage(path)
free = usage.free/1024/1024/1024
percentage = 100*usage.free/usage.total
return (free,percentage)
@geosharma
geosharma / aurutils_inst_conf.md
Last active September 17, 2024 23:18
Arch Linux: aurutils installation and configuration

aurutils installation and configuration

This is not a getting started guide, just notes to myself. Due to my limited knowledge there could be mistakes and better ways to do things. I have configured aurutils to the best of my knowledge after reading the manpages and forums. Please refer to aurutils(7) manpages for installation and configuration.

Reference: aurutils(7)

Install aurutils

Install the aurutils using the normal AUR package installation procedure. Until I found aurutils, I used to create a separate directory ~/aur/ for all AUR packages.

@uucidl
uucidl / 00_the-problem-with-UI.org
Last active May 3, 2024 22:38
The Problem Of UI (User Interfaces)

Links

Note: a lot of programmers talk about UI without mentionning the user even once, as if it was entirely a programming problem. I wonder what we’re leaving off the table when we do that.

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active September 19, 2024 19:00
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@roachhd
roachhd / README.md
Last active September 15, 2024 11:25
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION