Skip to content

Instantly share code, notes, and snippets.

View sebnash's full-sized avatar

Seb Nash sebnash

View GitHub Profile
@rustymyers
rustymyers / postflight
Created September 26, 2011 16:04
CreateUserLion fix for ARD
#!/usr/bin/python
#
# Payload free package to create a user on a 10.7 system.
import sys
import os
import re
import time
import subprocess
@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
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
@glarizza
glarizza / gist:1445481
Created December 8, 2011 00:24
OS X Lion Password Hash Instructions

Password Hash Accessing:

  • Grab plist file from /var/db/dslocal/nodes/Default/users/username.plist

  • Convert to xml

      plutil -convert xml1 username.plist
    
  • Grab the ShadowHashData key and base64 decode it (install base64 with port install base64)

      echo "Data from ShadowHashData Key" | base64 -d > ShadowHashData
    
  • Convert the resultant binary plist file into xml

@cengage
cengage / OS X build plan for veewee
Last active October 28, 2020 14:01
First shot at describing the process of building a vanilla OS X box with veewee using only the OS X installer application.
Notes using minstallconfig.xml
- Create base OS X vmx w/ veewee:
* HD must be IDE, not SCSI
* Do not define a specific boot device, VM will boot from DMG attached to CD-ROM later in process
- Obtain "Install OS X Mountain Lion.app"/"Install Mac OS X Lion.app"
- Mount InstallESD.dmg w/ shadow file from "Install Mac OS X Lion.app/Contents/SharedSupport/InstallESD.dmg"
* hdiutil attach "[...]/Install Mac OS X Lion.app/Contents/SharedSupport/InstallESD.dmg" -owners on -shadow /tmp/InstallESD.shadow
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active October 26, 2024 06:05
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@rtrouton
rtrouton / gist:7111637
Last active January 11, 2017 13:48
Updated create_vmware_osx_install_dmg.sh now includes support for Mavericks.
#!/bin/sh
#
# Preparation script for a customized OS X installer for use with VWware Fusion and ESXi
#
# What the script does, in more detail:
#
# 1. Mounts the InstallESD.dmg using a shadow file, so the original DMG is left
# unchanged.
# 2. minstallconfig.xml is also copied, which is looked for by the installer environment's
# rc.* files that first load with the system. This allows us to never actually modify the
@lisamelton
lisamelton / transcode-video.sh
Last active May 24, 2024 17:42
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015
@lisamelton
lisamelton / detect-crop.sh
Last active May 24, 2024 17:42
Detect crop values for video file to use with `mplayer` and `transcode-video.sh` (a wrapper script for `HandBrakeCLI`).
#!/bin/bash
#
# detect-crop.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 3.3 of January 22, 2015
@lisamelton
lisamelton / convert-mp4-to-mkv.sh
Last active May 24, 2024 17:41
Convert MP4 video file into Matroska format without transcoding.
#!/bin/bash
#
# convert-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 2.0 of December 3, 2014
# Enable SSH
# Configuration > Security Profile > Services > Properties > SSH > Options... > Start
esxcli system maintenanceMode set --enable true
esxcli system maintenanceMode get
esxcli network firewall ruleset set -e true -r httpClient
export PROFILE=$(esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep "standard" | sort | tail -n 1 | cut -d' ' -f 1)
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p $PROFILE
esxcli network firewall ruleset set -e false -r httpClient
esxcli system shutdown reboot --reason "Updating to $PROFILE"