Skip to content

Instantly share code, notes, and snippets.

View amanaplan's full-sized avatar

Christian Stück amanaplan

  • St. Petersburg, FL
View GitHub Profile
@amanaplan
amanaplan / Sendmail with Microsoft 365 SMTP Relay
Created April 18, 2025 05:45 — forked from amanjuman/SendMail with Office365 SMTP Relay
Sendmail with Microsoft 365 SMTP Relay
// Update Packages
sudo apt-get update && sudo apt-get -y upgrade && sudo apt dist-upgrade -y && sudo apt-get autoremove -y
// Setup Hostname
hostnamectl set-hostname subdomain.domain.tld
// Create Host Record
sudo nano /etc/hosts
// Add this line
@amanaplan
amanaplan / pulseserver.adoc
Created February 15, 2025 21:48 — forked from Earnestly/pulseserver.adoc
PulseAudio as a Server

Multiplexing Access to Audio Hardware via a Single PulseAudio Server

The goal of this setup is to create a single pulseaudio service which has sole access to the audio hardware while providing a server for many clients to use. This is not using the system wide mode as it doesn’t run as root, nor does it use the --system flag.

One disadvantage of this arrangement is that the commands pacmd and pactl will no longer work when run as your user. Both rely on the user dbus session

@amanaplan
amanaplan / gist:078549de0c9566324f41ea07f200eb8f
Last active April 29, 2024 01:59 — forked from mattes/gist:40b5fac8231ca567e94416e7c88d2c10
Multiple Google Chrome instances on MacOS
# http://peter.sh/experiments/chromium-command-line-switches/
mkdir -p /tmp/t1
open -na "Google Chrome" --args --user-data-dir=/tmp/t1 --remote-debugging-port=9222 --disable-features=EnforcePrivacySandboxAttestations,FledgeEnforceKAnonymity
# protip: press cmd+h to hide window
@amanaplan
amanaplan / README.md
Created March 7, 2023 19:01 — forked from cgagner/README.md
Electron client certification test

Electron Client Certificate Test

Electron smart card authentication is not working on Linux. The smart card authentication relies on client certifications. This gist has instructions for testing client certifications, which will be used to test smart card authentication.

Simple example

The main.js handles the 'select-client-certificate' event from the

#!/bin/sh
## 98-vlan8_to_wan2.sh
## A script to add policy-based routing to send VLAN8 to WAN2 on the UDM-Pro
## Includes monitoring to re-add rules in the event of config changes
vlan8_to_wan2_monitor() {
(while :; do
ip rule show | grep 32400 &> /dev/null ||
(ip rule add pref 32400 from all iif br8 lookup 202)
sleep 1
@amanaplan
amanaplan / README.md
Created July 12, 2021 03:46 — forked from bekce/README.md
ldap server with mysql backend

I wanted to build an LDAP server that queries a MySQL server to fetch users and check their passwords. It is mainly used for old software that does not work with custom OAuth2 providers. Redmine is an example of this.

Instructions:

  1. Create the database and table with insert.sql
@amanaplan
amanaplan / gist:d9136200b10736e01f8238f4fa44f9f1
Created October 4, 2017 13:26 — forked from phayes/gist:2770495
Manually rendering ctools-content-type
<?
ctools_include('plugins');
ctools_include('context');
ctools_include('content');
$plugin_id = 'super_pane';
$plugin = ctools_get_plugins('ctools','content_types', $this->options['field'], $plugin_id);
$conf = array() // array of configuration to pass to the content-type
@amanaplan
amanaplan / gist:a7fba8c17472327f103b4416bebc6066
Created June 27, 2017 00:59 — forked from steve-todorov/gist:3671626
PHP Array key search for matching string.
<?php
/**
* Search through an array for a matching key.
*
* Examples:
* <code>
* $array = array(
* "database.name" => "my_db_name",
* "database.host" => "myhost.com",
@amanaplan
amanaplan / fix-vagrant-nfs.sh
Last active May 31, 2017 19:52
Fix Vagrant NFS Bash Script
#!/bin/bash
echo "\r"
echo "This script will attempt to resolve Vagrant-related"
echo "nfsd issues on macOS by removing all entries from"
echo "/etc/exports and restarting nfsd."
echo "\r"
# Ask user to confirm execution.
read -r -p "Would you like to continue? [y/N]: " response
@amanaplan
amanaplan / responsive-modal.css
Created April 6, 2017 15:44 — forked from jameswilson/responsive-modal.css
Drupal Ctools Responsive Modal
/* Override inline dom styles from modal.js */
#modalContent {
position: fixed !important;
top: 12% !important;
bottom: 12% !important;
right: 4% !important;
left: 4% !important;
}
/* Limit max width to 1000px */
div.ctools-modal-content {