Skip to content

Instantly share code, notes, and snippets.

@opragel
opragel / laziest_install_microsoft_office2016.sh
Last active October 19, 2022 08:51
laziest_install_microsoft_office2016.sh
#!/bin/bash
# witness the horror
# seriously don't do this
# last warning.. maybe
# Guess I'm putting a license in
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.
@opragel
opragel / forcefully_remove_mdm_1015.sh
Last active August 2, 2022 19:39
forcefully_remove_mdm_1015.sh
#!/bin/bash
# Seriously there still apparently aren't enough warning labels
# If you don't understand the consequences don't do it
REMOVE_PATHS=( # "/var/db/ConfigurationProfiles/.passcodePolicesAreInstalled"
# "/var/db/ConfigurationProfiles/.cloudConfigHasActivationRecord"
# "/var/db/ConfigurationProfiles/.cloudConfigNoActivationRecord"
# "/var/db/ConfigurationProfiles/.cloudConfigProfileObtained"
# "/var/db/ConfigurationProfiles/.cloudConfigRecordFound"
# "/var/db/ConfigurationProfiles/.profilesAreInstalled"
@opragel
opragel / reinstall_checkpoint_endpoint_vpn_osx.sh
Created December 16, 2015 19:57
reinstall_checkpoint_endpoint_vpn_osx.sh
#!/bin/bash
# Completely stops & unloads Checkpoint, then uninstalls.
#/Library/Application\ Support/Checkpoint/Endpoint\ Connect/uninstall --uninstall
VPN_SITE_ADDRESS="secure.contoso.com"
# !!! Script expects a flat DMG file, such as one created using JAMF's Composer!
CHECKPOINT_INSTALLER_URL="https://s3-us-west-2.amazonaws.com/my-cool-bucket/checkpoint-endpointVPN-versionDERP.dmg"
CHECKPOINT_INSTALLER_VOLUME="endpointVPN-835017303"
REMOVE_PATHS=( "/Applications/Endpoint Security VPN.app" \
"/Library/Application Support/Checkpoint/" \

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@opragel
opragel / install_ringcentral_desktop_macos.sh
Last active August 30, 2021 12:14
install_ringcentral_desktop_macos.sh
#!/bin/bash
# Running artisinal bash install scripts is generally not recommended.
# your funeral
DOWNLOAD_URL="https://downloads.ringcentral.com/sp/RingCentralForMac"
DMG_VOLUME_PATH="/tmp/RingCentral for Mac"
APP_NAME="RingCentral For Mac.app"
APP_PATH="/Applications/$APP_NAME"
APP_PROCESS_NAME="Softphone"
APP_INFO_PLIST="Contents/Info.plist"
@opragel
opragel / install_google_chrome_osx_auto.sh
Last active August 30, 2021 12:13
install_google_chrome_osx_auto.sh
#!/bin/bash
# Running artisinal bash install scripts is generally not recommended.
# your funeral
DOWNLOAD_URL="https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
DMG_VOLUME_PATH="/Volumes/Google Chrome/"
APP_NAME="Google Chrome.app"
APP_PATH="/Applications/$APP_NAME"
APP_PROCESS_NAME="Google Chrome"
APP_INFO_PLIST="Contents/Info.plist"
@opragel
opragel / remove_pritunl_osx.sh
Last active August 23, 2020 17:42
remove_pritunl_osx.sh
#!/bin/bash
# Disclaimer: it's your funeral
APP_PROCESS_NAME="Pritunl"
DAEMON_PATHS=( "/Library/LaunchAgents/com.pritunl.client.plist" \
"/Library/LaunchDaemons/com.pritunl.service.plist" \
"/Library/LaunchDaemons/net.sf.tuntaposx.tap.plist" \
"/Library/LaunchDaemons/net.sf.tuntaposx.tun.plist" )
@opragel
opragel / help.apple.com_urls
Last active July 4, 2020 05:05
help.apple.com_urls
help.apple.com pages:
https://help.apple.com/accessibility/mac/control/10.12/
https://help.apple.com/deployment/macos/
https://help.apple.com/deployment/ios/
https://help.apple.com/deployment/business/
https://help.apple.com/education/
https://help.apple.com/deployment/education/
https://help.apple.com/machelp/mac/10.12/
https://help.apple.com/serverapp/mac/
@opragel
opragel / add_certificate_to_keychain_and_trust.sh
Created July 29, 2015 03:27
add_certificate_to_keychain_and_trust.sh
#!/bin/bash
KEYCHAIN_PATH="/Library/Keychains/System.keychain"
CERTIFICATE_CER_PATHS=( \
"/private/tmp/my-certificate-1.cer" \
"/private/tmp/my-certificate-2.cer" )
for certificateCerPath in "${CERTIFICATE_CER_PATHS[@]}"; do
certificatePemPath="$certificateCerPath.pem"
openssl x509 -inform der -in "$certificateCerPath" -out "$certificatePemPath"
opensslVerifyResponse=$(openssl verify -CAfile "$certificatePemPath" "$certificatePemPath" | grep -o 'error.*at .*depth')
@opragel
opragel / add_vpn_to_menu_and_enable_show_time.sh
Created March 28, 2016 04:42
add_vpn_to_menu_and_enable_show_time.sh
#!/bin/bash
# Script adds the VPN item to the menu bar and enables the 'show time
# connected' & 'show status while connecting' options. Last tested on 10.11
currentUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')
currentUserHomeDirectory=$(dscl . -read "/users/$currentUser" NFSHomeDirectory | cut -d " " -f 2)
vpnMenuItemExists=$(defaults read "$currentUserHomeDirectory/Library/Preferences/com.apple.systemuiserver" menuExtras | grep -o VPN)
if [ "$vpnMenuItemExists" ]; then
printf "VPN menu item is already on the status bar!"