aptitude search "?narrow(?installed,?not(?origin(Debian)))" | sed "s/^i\sA*\s//" | cut -d " " -f 1 | while read package; do echo -n "$package "; apt-cache policy $package | awk "/\*/{getline; print}" | sed "s/ *[0-9]* //" | cut -d " " -f 1; done | column -t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Good o'l Reddit | |
// @description Makes sure you're using Good o'l Reddit. (C) TheNH813 2018. License WTFPLV2 | |
// @version 1.0 | |
// @match *://www.reddit.com/* | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
if (window.location.href.indexOf("www.reddit.com/media") > -1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_complete_ssh_hosts () | |
{ | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \ | |
cut -f 1 -d ' ' | \ | |
sed -e s/,.*//g | \ | |
grep -v ^# | \ | |
uniq | \ | |
grep -v "\[" ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mail.py | |
# simple Python script for testing smtp connections | |
# see https://realpython.com/python-send-email/#sending-a-plain-text-email | |
import smtplib, ssl | |
smtp_server = "<your-smtp-hostname>" | |
smtp_username = "<your-smtp-username>" | |
sender_email = "<sender-email-address>" | |
receiver_email = "<receiver-email-address>" | |
port = 587 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Downmix 5.1 to stereo, compress dynamic range and normalize an audio track using ffmpeg. | |
# | |
# This comes in handy when you're constantly fiddling with your volume control while watching a movie | |
# because the dialogues are too silent and the explosions too loud. | |
# | |
# Firstly, Surround sound is mixed down to stereo. Then, audio is normalized with the intention to "fit" | |
# the "points" of the following DRC process using the compand filter. The last step is to ensure that the end | |
# result is normalized. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# mysql-dsn | |
# Takes a DSN as argument and tries to connect to the specified database using the "mysql"-command. | |
# Passwords must be quoted ("url-encoded"). | |
# | |
# Example: | |
# $ mysql-dsn mysqli://me:top_secret@hostname:33006/db-name | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /etc/apt/apt.conf.d/60aptchecker | |
// runs aptchecker after dpkg (e.g. apt upgrade) | |
DPkg::Post-Invoke {'/opt/bin/aptchecker';}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Filename: /etc/pm/sleep.d/10_restart_network_manager | |
# | |
# Restarts Network Manager on resume from suspend. | |
# Useful if NM takes too long to find your wireless Network. | |
# Needs to be executable for root. | |
case $1 in | |
resume|thaw) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
priorities=(required important standard) | |
for priority in "${priorities[@]}" | |
do | |
dpkg-query -W --showformat='${Package}\t${Priority}\n' | grep "$priority$" | sed "s/\t$priority//g" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "MESSAGE BODY" | mailx -s "SUBJECT" -a "FILENAME" -r [email protected] [email protected] |