Skip to content

Instantly share code, notes, and snippets.

@0mark
0mark / dmount
Last active October 13, 2021 15:18
Mount/unmount with dmenu
#!/bin/bash
##### CONFIG
DEVS=( "sd" "mmcblk" )
BLOCK=( "sda" )
#### DO NOT TOUCH
c=0
@0mark
0mark / rdbks
Last active December 21, 2015 08:59
Backup with rsync
#!/bin/sh
##### CONFIG
SRC=( "/home/mark" "/etc" )
BACKUPDIR=$1
#### DO NOT TOUCH
BACK=$(pwd)
if [ -d "${BACKUPDIR}" ]; then
@0mark
0mark / kopierkc
Last active December 21, 2015 08:59
Scanner/Printer Copything
#!/bin/bash
FILE=/tmp/kopierkc
echo "Searching..."
PRINTER=$(LANG=C lpstat -p -d | grep "is idle" | wc -l)
if [ $PRINTER -lt 1 ]; then
echo "No idle Printer found."
exit 1
fi
@0mark
0mark / torchwood
Last active December 21, 2015 08:59
Buuuuuuuuurn!
#!/bin/bash
# ***** CONFIG
DRV="/dev/sr0"
# ***** /CONFIG
# ***** FUNCTIONS
doordie() {
if [ "$1" == "" ]; then
@0mark
0mark / recoder
Last active December 21, 2015 08:59
Recode video files, record from dvb
#!/bin/sh
if [ "$1" == "-h" ]; then
echo "recoder RESOLUTION QUALITY [crop] FILETYPE"
echo
echo "Resolutions:"
echo " llow: 170x* , mencoder"
echo " low: 320x* , mencoder"
echo " mid: 528x* , mencoder"
echo " high: 720x* , mencoder"
@0mark
0mark / 0dinge
Last active December 21, 2015 08:49
Dinge
- beedasul
creates playlist for madasul using beet
- deepcnv.pl
converts charset recursively
- dvd2avi
rips a dvd
@0mark
0mark / remv0r.pl
Last active December 21, 2015 08:49
Pacman thing
#!/usr/bin/perl
use strict;
if (not -e "pkglist") {
exec("pacman -Qqet > pkglist");
}
my $param=shift();
my @keep=split(/\n/,`cat pkglist | grep -v '^#'`);
#! /bin/bash
. /usr/lib/network/network
DEBUG=1
out() {
if [ $DEBUG -eq 1 ]; then
if [ "$1" != "" ]; then echo $1; fi
elif [ "$2" != "" ]; then
@0mark
0mark / LICENSE
Last active December 21, 2015 08:49
This program is based o xmenud from Matthias Kühlk
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
@0mark
0mark / qlan
Last active December 21, 2015 07:19
simple network script (dhcp, iwconfig, wpa_supplicant, ppp, pin, auth by ssh)
#!/bin/bash
sudo /usr/bin/quicklan $1 $2