Skip to content

Instantly share code, notes, and snippets.

@talkingmoose
talkingmoose / Download and Install Microsoft product.zsh
Last active April 22, 2024 23:51
**Download the latest version of this script from: https://gist.github.com/b6637160b65b751824943ede022daa17 .** Downloads and installs the latest available Microsoft product specified directly on the client. This avoids having to manually download and store an up-to-date installer on a distribution server every month.
#!/bin/zsh
:<<'ABOUT_THIS_SCRIPT'
-----------------------------------------------------------------------
Written by:William Smith
Partner Program Manager
Jamf
bill@talkingmoose.net
https://gist.github.com/b6637160b65b751824943ede022daa17
@opshope
opshope / reveal_autologin_password.sh
Created November 17, 2015 18:02
Decrypt the auto-login password stored in /etc/kcpassword on OSX
sudo ruby -e 'key = [125, 137, 82, 35, 210, 188, 221, 234, 163, 185, 31]; IO.read("/etc/kcpassword").bytes.each_with_index { |b, i| break if key.include?(b); print [b ^ key[i % key.size]].pack("U*") }'
@richardW8k
richardW8k / RW_Button_Field.php
Last active January 15, 2020 08:44
Adds a Button field type allowing you to add extra buttons to the form, supported type are button, submit and reset.
<?php
/**
* Plugin Name: Gravity Forms - Button Field
* Last Modified: 22/06/2014
*/
class RW_Button_Field {
function __construct() {
if( ! property_exists( 'GFCommon', 'version' ) || ! version_compare( GFCommon::$version, '1.8', '>=' ) )
@arubdesu
arubdesu / makefile
Last active September 4, 2021 18:02
Luggage makefile-generated pkg to drop dummy receipts in place which stop prompt to update/adopt Mac AppStore apps (in this case for iLife without Garageband)(may also need to wipe /var/db/.MASManifest, as per @jessepeterson)
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=iWorkDummyReceipts
REVERSE_DOMAIN=org.my.iWorkDummyReceipts
PACKAGE_VERSION=0.1
PAYLOAD=pack-iWorkDummyReceipts
pack-iWorkDummyReceipts: l_Applications
@sudo mkdir -p -m 755 ${WORK_D}/Applications/{Numbers,Pages,Keynote}.app/Contents/_MASReceipt
@sudo touch ${WORK_D}/Applications/{Numbers,Pages,Keynote}.app/Contents/_MASReceipt/receipt
@bryanzak
bryanzak / ARDFixer.command
Last active March 3, 2017 05:36
ARD Admin 3.7.1 Fixer - a script to cause ARD Admin to effectively "forget" all cached IP and DNS information for known computers. This deals with a problem in ARD Admin 3.7.1 where it seems to be too aggressive in caching this information
#!/bin/bash
SCRIPT_VERSION="1.0"
# some background info here: https://discussions.apple.com/message/24596710#24596710
# verify ARD Admin version
# quit ARD Admin - if running, wait 10 seconds
# kill cfprefsd
# rename plist
# sed
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active July 24, 2024 15:28
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx