Skip to content

Instantly share code, notes, and snippets.

View MacsInSpace's full-sized avatar

Craig Hair MacsInSpace

  • Department of Education
  • Melbourne
  • 08:51 (UTC +10:00)
View GitHub Profile
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active June 9, 2024 11:31
crack activate Office on mac with license file
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active June 7, 2024 09:55
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@kylemoseby
kylemoseby / twitter_api_example.py
Last active June 21, 2022 23:04
Clean up for Twitter account automatcally
import csv
from threading import Timer
import tweepy
class mkm():
apiCalls = 0
def __init__(self, api):
print "Initialising Twitter Account Tools"
#!/bin/sh
# default commands for osx to make it nicer to work with
##########################
# General UI?UX settings #
##########################
# Set hostname (hex of MVB9APPS)
sudo scutil --set ComputerName "0x4d56423941505053"
sudo scutil --set HostName "0x4d56423941505053"
@scriptingosx
scriptingosx / os_version.sh
Last active April 15, 2023 10:04
Sample bash script to show how to parse the macOS version
#!/bin/bash
# use argument 1 as the version or get it from sw_vers
os_ver=${1-:$(sw_vers -productVersion)}
# string comparison
if [[ "$os_ver" == 10.13.* ]]; then
echo "macOS High Sierra"
elif [[ "$os_ver" == 10.12.* ]]; then
echo "macOS Sierra"
@robinsloan
robinsloan / shh.rb
Last active August 18, 2023 12:09
Disable RTs from all the people you follow on Twitter.
require "rubygems"
require "twitter"
# get these from apps.twitter.com
CONSUMER_KEY = "foo"
CONSUMER_SECRET = "bar"
OAUTH_TOKEN = "blee"
OAUTH_TOKEN_SECRET = "baz"
TWITTER_USER = "your_username" # needs to be the one associated with keys above
@gregneagle
gregneagle / startosinstall_10.12.6_normalboot.txt
Last active February 6, 2024 07:28
Comparison of startosinstall's available options depending on boot OS environment
bash-3.2$ /Applications/Install\ macOS\ Sierra.app/Contents/Resources/startosinstall --usage
Usage: startosinstall --applicationpath <install macOS.app path>
Arguments
--applicationpath, a path to copy of the OS installer application to start the install with.
--license, prints the user license agreement only.
--agreetolicense, agree to license the license you printed with --license.
--rebootdelay, how long to delay the reboot at the end of preparing. This delay is in seconds and has a maximum of 300 (5 minutes).
--pidtosignal, Specify a PID to which to send SIGUSR1 upon completion of the prepare phase. To bypass "rebootdelay" send SIGUSR1 back to startosinstall.
--usage, prints this message.
@carlashley
carlashley / convert_config_profile.py
Last active March 16, 2023 22:23
Converts a Wi-Fi configuration profile from standard configuration to SystemConfiguration type
#!/usr/bin/python
'''Converts a standard Wi-Fi configuration profile for iOS/macOS that uses
a user certificate, and converts it into a SystemConfiguration profile type
that can be used to connect to a Wi-Fi network at macOS login screen.
This is useful where you need a laptop to be able to bind to an AD or LDAP
server, or just want to have user credential free Wi-Fi connection at the
system level.'''
import os
import plistlib
@wmalarski
wmalarski / TTblock.py
Last active March 7, 2020 00:33
Blokada troll kont
from __future__ import division
import tweepy
import configparser
config = configparser.ConfigParser()
config.read('config.ini')
access_token_secret = config['TWEEPY']['access_token_secret']
consumer_secret = config['TWEEPY']['consumer_secret']
consumer_key = config['TWEEPY']['consumer_key']
@abn
abn / install-homebrew-osx.sh
Last active January 5, 2023 09:24
Install homebrew from behind a proxy on Mac OS X.
#!/usr/bin/env bash
# Based on: http://godlessheathenmemoirs.blogspot.com.au/2015/03/homebrew-aka-brew-on-mac-os-x-behind.html
function usage() {
echo 2>&1 ""
echo 2>&1 "usage: $(basename $0) PROXY_HOST PROXY_PORT"
exit 1
}
PROXY_HOST=${PROXY_HOST:-$1}