Skip to content

Instantly share code, notes, and snippets.

View andebor's full-sized avatar

Anders Borud andebor

View GitHub Profile
@srv89
srv89 / python_email.py
Last active January 29, 2024 00:24
Python code for sending HTML email (Attachment + Multiple Recipients )
__author__ = 'srv'
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
username = '' # Email Address from the email you want to send an email
password = '' # Password
server = smtplib.SMTP('')
@ipedrazas
ipedrazas / gist:2c93f6e74737d1f8a791
Created September 18, 2014 22:13
List Docker Container Names and IPs
function drips(){
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.IPAddress }} {{ .Name }}' | sed 's/ \// /'
}
@alghanmi
alghanmi / deluge-daemon_init.sh
Last active February 5, 2016 07:29
Deluge init script taken from the Deluge User Guide. Note that references to deluge web are removed. http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/Ubuntu
#!/bin/sh
### BEGIN INIT INFO
# Provides: deluge-daemon
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Daemonized version of deluge and webui.
@prebenlm
prebenlm / .A how to display Irssi-hilights in OS X Notification Center.md
Last active August 12, 2019 08:54
Guide: how to make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier

Irssi in Mac OS X Notification Center

Mou icon

Overview

This guide will explain how you can make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier.

We will also explain how the process can be automatically started each time you log in to your Mac and ensure the connection to the server is kept alive.

@spikegrobstein
spikegrobstein / nginx.conf
Last active September 22, 2023 04:19
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
@ttscoff
ttscoff / bid.sh
Created July 31, 2012 20:27
Retrieve Bundle Identifiers for OS X applications using semi-fuzzy string matching
bid() {
local shortname location
# combine all args as regex
# (and remove ".app" from the end if it exists due to autocomplete)
shortname=$(echo "${@%%.app}"|sed 's/ /.*/g')
# if the file is a full match in apps folder, roll with it
if [ -d "/Applications/$shortname.app" ]; then
location="/Applications/$shortname.app"
else # otherwise, start searching
@matthutchinson
matthutchinson / fnotify.pl
Created August 21, 2010 10:47
Irssi fnotify
# todo: grap topic changes
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '0.0.3';
%IRSSI = (
authors => 'Thorsten Leemhuis',
contact => 'fedora@leemhuis.info',