Skip to content

Instantly share code, notes, and snippets.

View dragonee's full-sized avatar

Michał Moroz dragonee

View GitHub Profile
@dragonee
dragonee / .bashrc
Last active August 19, 2017 18:25
A command to convert album with separate FLAC files and import it to iTunes
# adds three functions to your Bash terminal:
# flac2mp3 DIRECTORY - converts a directory with .flac files to .mp3 format
# itunesadd DIRECTORY - moves MP3 files to iTunes "Add Automatically" folder
# flac2itunes DIRECTORY - converts files to mp3 and adds them to iTunes in one step
#
# options can be modified below
# requires flac2mp3.pl from https://github.com/robinbowes/flac2mp3
export FLAC2MP3_APP="/Users/dragonee/Kod/flac2mp3/flac2mp3.pl"
export FLAC2MP3_OPTIONS="--processes=5 --preset=320"
@dragonee
dragonee / .bashrc
Last active March 5, 2019 23:16
startenv for gnome-terminal
#!/bin/bash
# stub implementation of https://github.com/dragonee/iterm2-startenv for gnome-terminal
# using bash and nodejs
# this code should be put at the end of your .bashrc
# usage:
# put https://github.com/dragonee/iterm2-startenv/blob/master/examples/fullexample.js
# as .startenv.js in your project root directory
# modify it to your needs
@dragonee
dragonee / docopt-example.py
Created March 14, 2022 08:30
Docopt example
"""
Wait for a specific process to finish, then notify via Pushover API.
Usage:
notify-on-exit [options] PID [MESSAGE]
Options:
-p High priority (this message will pop on the phone).
-b Run in the background.
--version Show version information.
@dragonee
dragonee / setup.py
Created March 14, 2022 08:36
setup.py example
from setuptools import setup, find_packages
setup(
name='randomtools',
version='1.0.0',
description='A package that provides all maintenance tasks',
author='Michał Moroz <michal@makimo.pl>',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
@dragonee
dragonee / .tasks-collector.ini
Created March 14, 2022 08:42
ConfigParser example
[Tasks]
url = https://api.example.org
user = someusername
password = somepassword