Skip to content

Instantly share code, notes, and snippets.

@maxim
maxim / msteams.lsrules
Last active May 3, 2024 00:02
Little Snitch rules for Microsoft Teams classic, updated at 2024-05-03 00:02:05+00:00.
{
"description": "Rules based on Microsoft Endpoints at https://endpoints.office.com/endpoints/worldwide?clientrequestid=b794baa0-662f-4592-b4f0-46ab3284b612&ServiceAreas=Skype",
"name": "Microsoft Teams classic",
"rules": [
{
"action": "allow",
"process": "/Applications/Microsoft Teams classic.app/Contents/MacOS/Teams",
"remote-addresses": "13.107.64.0-13.107.127.255,52.112.0.0-52.115.255.255,52.122.0.0-52.123.255.255,2603:1063::-2603:1063:3ff:ffff:ffff:ffff:ffff:ffff",
"ports": "3478-3481",
"protocol": "udp"
#!/bin/sh
grep pam_tid /etc/pam.d/sudo >/dev/null || echo auth sufficient pam_tid.so | cat - /etc/pam.d/sudo | sudo tee /etc/pam.d/sudo > /dev/null
@Deconstrained
Deconstrained / update_ec2_pd_webhook_ip_security_group.py
Last active January 20, 2022 00:20
Updates an EC2 security group with rules to permit connections from PagerDuty IP addresses
#!/usr/bin/env python
import argparse
import logging
import os
import requests
import subprocess
import sys
from boto.ec2 import get_region
@dzderic
dzderic / vpnc-script
Created December 14, 2012 11:11
A custom OpenConnect script to set DNS using `networksetup` on OSX, which makes it work with things that don't read from `/etc/resolv.conf`
#!/bin/sh
#
# Originally part of vpnc source code:
# © 2005-2012 Maurice Massar, Jörg Mayer, Antonio Borneo et al.
# © 2009-2012 David Woodhouse <dwmw2@infradead.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
@jonlabelle
jonlabelle / update-macports.sh
Created June 15, 2012 22:10
Update MacPorts bash script
#!/bin/bash
# script for daily maintenance of mac ports
# upgrades to packages
# discards orphaned packages, etc.
# check for user id (must be run as root)
if [ ${EUID} != 0 ]; then
echo "script must be run as root! Recalling with sudo"
sudo $0
@carlosmcevilly
carlosmcevilly / gist:2221249
Created March 27, 2012 22:55
fix git commit with wrong email address in git config, before pushing
If:
- you add and commit with the wrong email address in git, and
- your remote has a hook set up to prevent you from pushing with the bad address
Then you need to amend the author of your commit before push can succeed:
1. fix your email address in git config:
$ git config user.name "Your Name"
@ticean
ticean / SVN_Git_Mirror.md
Created January 3, 2012 21:14
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References