- Convert multipage PDF into single page PNG files with GhostScript
gs -o /path/to/output_page_%03d.png -sDEVICE=png16m -r150 /path/to/input.pdf
- Convert multiple single-page PDF files into one multi-page PDF file
gs -o /path/to/output_page_%03d.png -sDEVICE=png16m -r150 /path/to/input.pdf
## Commonly used PSADT env variables | |
$envCommonDesktop # C:\Users\Public\Desktop | |
$envCommonStartMenuPrograms # C:\ProgramData\Microsoft\Windows\Start Menu\Programs | |
$envProgramFiles # C:\Program Files | |
$envProgramFilesX86 # C:\Program Files (x86) | |
$envProgramData # c:\ProgramData | |
$envUserDesktop # c:\Users\{user currently logged in}\Desktop | |
$envUserStartMenuPrograms # c:\Users\{user currently logged in}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs | |
$envSystemDrive # c: | |
$envWinDir # c:\windows |
#!/usr/bin/python | |
# pylint: disable=E0611, E1101, E0602 | |
''''Fix 802.1x When Using Config Profiles and PEAP-MSCHAPV2 or EAP-TLS''' | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
# | |
# This script will find the system profile that is attached to one ethernet | |
# interface from our configuration profile and then copy it to all other | |
# ethernet interfaces so that other ethernet interfaces can be used instead | |
# of just the FirstActiveEthernet at time of profile installation. This issue | |
# is still an issue as of 10.12.3 |
/** | |
* The following is an example of creating encryption keys using AWS KMS. | |
*/ | |
var Q = require('q'); | |
var AWS = require('aws-sdk'); | |
var kms = new AWS.KMS({region: 'us-east-1'}); | |
/** | |
* Example of create a "data" key with AWS KMS. Data keys are just encryption keys |
#!/bin/bash | |
setupProcess=$( /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}' ) | |
# specify SSID | |
while [[ "$setupProcess" != "TMI Wi-Fi" ]] | |
do | |
sleep 1 | |
echo "Sleeping 1 second..." | |
setupProcess=$( /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}' ) |
I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.
Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details
Internally, launchd has several domains, but launchctl 1 would only ask for service names,
#!/bin/bash | |
# ============================================================================= | |
# Author: Chu-Siang Lai / chusiang (at) drx.tw | |
# Filename: teams-chat-post-for-workflows.sh | |
# Modified: 2024-07-22 11:44 (UTC+08:00) | |
# Description: Post a message to Microsoft Teams via "Post to a chat when a webhook request is received" workflows. | |
# Reference: | |
# | |
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025 | |
# - https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/ |
This is my personal guide for installing pfSense. Hope you find it useful. I made these notes to capture the details of my "install from scratch" to ensure I didn't miss important details. Also, I'm trying build my network with discrete "disposable" components that make the system mutable and less rigid. It does not cover installing any packages like Squid or Suricata as that's way beyond the scope of a basic, functional install.
I migrated from an environment that was at various times running Tomato Toastman 1.28 or Asuswrt-Merlin on Netgear and ASUS routers across four "access points" (one always acting as the firewall/gateway, the rest as APs). It was OK pre-gigabit, but had roaming problems, and I was using large Wifi routers with most of the features disabled. Also, I found that I could easily swamp the network and tank VOIP and Wifi Calling without even trying. The only fix was to throttle everything by using Bandwidth Limit
#!/bin/bash | |
# get list of user home folders of users with UIDs over 500 | |
userList=$( dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }' ) | |
# get current epoch time | |
rightNow=$( /bin/date "+%s") | |
# recurse through user list | |
for aUser in $userList |
#!/bin/sh | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
# | |
# Written by: William Smith | |
# Professional Services Engineer | |
# JAMF Software | |
# [email protected] | |
# https://gist.github.com/c994139378083fea610affeca3c3f90c | |
# |