Skip to content

Instantly share code, notes, and snippets.

Craig Hair MacsInSpace

  • Melbourne
Block or report user

Report or block MacsInSpace

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Install-ESET.sh
#!/bin/bash
# Variables - edit to suit your environment
# Path to the ESET Endpoint Antivirus installer package file
pkgpath="/tmp/eset/Installer.pkg"
# Path to exported settings file you wish to import
settingsfile="/tmp/eset/eset.xml"
# Set the variable below to "replace" if you are going to apply your own user settings to the ESET GUI (e.g. notifications/alerts)
replaceguicfg="yes"
@MacsInSpace
MacsInSpace / install-xcode-cli-tools.sh
Last active Dec 18, 2019 — forked from mokagio/install-xcode-cli-tools.sh
Install Xcode CLI Tools without GUI
View install-xcode-cli-tools.sh
#!/bin/bash
# See http://apple.stackexchange.com/questions/107307/how-can-i-install-the-command-line-tools-completely-from-the-command-line
echo "Checking Xcode CLI tools"
# Only run if the tools are not installed yet
# To check that try to print the SDK path
xcode-select -p &> /dev/null
if [ $? -ne 0 ]; then
echo "Xcode CLI tools not found. Installing them..."
View ForLineIntxtDoTweepy.py
import tweepy
from tweepy import API
auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET")
auth.set_access_token("ACCESS_TOKEN", "ACCESS_TOKEN_SECRET")
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True, compression=True)
path = '/location/for/list/file_with_name_list.txt'
with open(path, 'r') as f:
@MacsInSpace
MacsInSpace / Gist
Last active Apr 28, 2019 — forked from jbnunn/Gist
Install Google Chrome from Powershell
View Gist
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)
View b2topodcast.py
import re
import sys
from datetime import datetime
from b2.api import B2Api
def parse(inp, mformat=None, thing=None):
if thing is None:
thing = 'th'
if mformat is None:
@MacsInSpace
MacsInSpace / unfavorite.js
Last active Feb 28, 2018 — forked from ashander/unfavorite.js
Delete all your favorites (unfavorite or unlike every tweet) on twitter.com (thx to @JamieMason and @b44rd for inspiring this)
View unfavorite.js
// 1. Run this in your console (open in chrome by View > Developer > JavaScript Console)
// Notes: this may take a while if you have a lot of favs/likes
// you can only access your most recent ~2000 likes.
// inspired by https://gist.github.com/JamieMason/7580315
//untested...
window.open("https://twitter.com/i/likes","_self")
var delayInMilliseconds = 5000; //1 second
setTimeout(function() {
@MacsInSpace
MacsInSpace / AppleSchoolManagerUpdater.ps1
Created Jul 27, 2017 — forked from ygini/AppleSchoolManagerUpdater.ps1
First version of a PowerShell script used to upload all required Apple School Manager CSV files based on AD and CSV.
View AppleSchoolManagerUpdater.ps1
### To run this script you must install Windows Management Framework 5.0 before https://www.microsoft.com/en-us/download/details.aspx?id=50395
### Be careful to get the right installation package for your server, 2012R2 isn't 2012
### Run
$clearFiles = $false
$dryRun = $false
### School settings
$asmLogin = "1234@sftp.apple.com"
You can’t perform that action at this time.