Millefeuille / Upgrade docker script
0 likes
0 forks
1 files
Last active
Run this script to upgrade docker on your machine, provide user in first argument to add them in the docker group
| 1 | #!/bin/sh |
| 2 | |
| 3 | if [ "$(id -u)" -ne 0 ]; then |
| 4 | echo "This script must be run as root" |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | ## Update lists |
| 9 | apt update |
| 10 |
Millefeuille / DEBIAN Install helper
0 likes
0 forks
1 files
Last active
An install helper for Debian based distros, that reads user input or a line by line package list in a file
| 1 | #!/bin/bash |
| 2 | |
| 3 | # Usage: |
| 4 | # bash debian_install_helper.sh # to be prompted for packages |
| 5 | # bash debian_install_helper.sh < package_list.txt # to install a newline separated package list |
| 6 | |
| 7 | function is_package_installed() { |
| 8 | dpkg -l | grep -q "^ii $1 " |
| 9 | } |
| 10 |
Millefeuille / .bashrc
0 likes
0 forks
1 files
Last active
My custom .bashrc file, heavily inspired by Parrot's one.
| 1 | ###### Color and Behavior ###### |
| 2 | |
| 3 | case $- in |
| 4 | *i*) ;; |
| 5 | *) return;; |
| 6 | esac |
| 7 | |
| 8 | # set a fancy prompt (non-color, unless we know we "want" color) |
| 9 | case "$TERM" in |
| 10 | xterm-color) color_prompt=yes;; |
Millefeuille / ID3Tagger
0 likes
0 forks
1 files
Last active
A little python script using mutagen module and MusicBrainz APIs to recover ID3 tags for a mp3 file
| 1 | import argparse |
| 2 | import datetime |
| 3 | import json |
| 4 | import urllib.request |
| 5 | import urllib.parse |
| 6 | import acoustid |
| 7 | from mutagen.id3 import ID3NoHeaderError, ID3, TIT2, TALB, TPE2, TPE1, APIC, TRCK, TLEN, TDRC, TYER |
| 8 | |
| 9 | base_url = "https://musicbrainz.org/ws/2" |
| 10 | cover_art_url = f"https://coverartarchive.org/release/" |
Millefeuille / cubEngine
0 likes
0 forks
1 files
Last active
A mini 2.5D engine in python
| 1 | import math |
| 2 | from kandinsky import * |
| 3 | |
| 4 | |
| 5 | def shade_color(intensity, dist, way, color): |
| 6 | if color >= 255 - 20: |
| 7 | color = 255 - 20 |
| 8 | if way: |
| 9 | ret = ((color / 255.0) + 0.1) * (intensity * (dist / 255.0)) |
| 10 | else: |
Newer
Older