Skip to content

Instantly share code, notes, and snippets.

View matsimon's full-sized avatar

Mathieu Simon matsimon

View GitHub Profile
@matsimon
matsimon / change-primary-address-existing-groups
Created May 12, 2021 17:23
A Powershell-Script that changes existing Teams/Unified Groups primary Mail address since Exchange Online Adress policies only apply to new groups
Connect-ExchangeOnline
"DisplayName,Modified,Primary,Leftovers" | Out-File -FilePath modifications.txt
$UnifiedGroups = Get-UnifiedGroup -ResultSize unlimited
foreach ($Group in $UnifiedGroups) {
$modified = $false
foreach ($address in $Group.EmailAddresses){
@matsimon
matsimon / M4300: Minimal example
Created October 7, 2020 07:29
M4300: Test YML files
---
# sw-m4300-demo
clock:
offset_hours: 10
timezone_acronym: AEST
fastpath:
vendor: netgear
family: m4300
<openvpn-server>
<vpnid>1</vpnid>
<mode>p2p_tls</mode>
<protocol>UDP4</protocol>
<dev_mode>tun</dev_mode>
<interface>opt1</interface>
<ipaddr></ipaddr>
<local_port>1194</local_port>
<description><![CDATA[Test instance]]></description>
[...]
Requires
- fddroidserver and basic requirements for binary repo (see their page)
- follow instrunctions to create a basic repo structure for a binary-only repo
- the android sdk of which you mostly need aapt and its libc++.so + local libraries to make it run
the SDK itself isn't redistirbutable mostly, get your own copy.
For the aapt I use ldd shows following libraries are needed on a Debian amd64 system:
ldd /opt/android-sdk-linux-mini/build-tools/23.0.1/aapt
linux-gate.so.1 (0xf774a000)
libc++.so => /opt/android-sdk-linux-mini/build-tools/23.0.1/lib/libc++.so (0xf756c000)
@matsimon
matsimon / 10.1 amd64
Last active August 29, 2015 14:12
poudriere testport Logs as per 05.01.2015: poudriere testport -v -j <jailname> -p 1labs -o net-mgmt...
[00:00:00] ====>> Creating the reference jail... done
[00:00:00] ====>> Mounting system devices for 101x64-lldpd-portsnap
[00:00:00] ====>> Mounting ports/packages/distfiles
[00:00:00] ====>> Stashing existing package repository
[00:00:00] ====>> Mounting packages from: /usr/local/poudriere/data/packages/101x64-lldpd-portsnap
[00:00:00] ====>> Mounting /var/db/ports from: /usr/local/etc/poudriere.d/options
/etc/resolv.conf -> /usr/local/poudriere/data/.m/101x64-lldpd-portsnap/ref/etc/resolv.conf
[00:00:00] ====>> Starting jail 101x64-lldpd-portsnap
[00:00:01] ====>> Logs: /usr/local/poudriere/data/logs/bulk/101x64-lldpd-portsnap/2015-01-06_17h45m06s
[00:00:01] ====>> Loading MOVED
@matsimon
matsimon / ad_authorized_keys.sh
Last active February 26, 2021 20:34
Script used by 'AuthorizedKeysCommand' to retrieve SSH keys in an Active Directory (OpenSSH >= 6.2)
#!/bin/bash
username=`echo $1`
# AD needs authenticated binds, it's an unprivileged user
# use the UPN to write little less
ldapsearch \
-o ldif-wrap=no \
-D "srv-sshkeylookup@mydomain" \
-w "PlaintextPassword" \
@matsimon
matsimon / gist:4187828
Created December 2, 2012 09:06
Set up and maintain a clean pfSense build environment
For those who are not so savy with Jails but do have possibility to run a full VM
# Install a default system
# - No ports -> We'll use portsnap later anyway
# - No packages -> The instructions are requiring fresh ports
#
# Based on: http://devwiki.pfsense.org/DevelopersBootStrapAndDevIso
# Edit /etc/ssh/sshd_config
# -> PermitRootLogin = yes