This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install coreutils from source on Mac OS X | |
# prepare workspace | |
mkdir -p ~/code/build-from-src/ && cd $_ | |
# download source code | |
curl -LO https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz | |
# expand | |
tar -xJvf coreutils-8.31.tar.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# new user account details | |
username="lapsadmin" | |
displayName="LAPS Admin" | |
password="P@55w0rd" | |
admin="yes" | |
hidden="yes" | |
# determine next available UID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from Foundation import NSZeroRect, NSMakeRect, NSMakeSize | |
from AppKit import NSPNGFileType, NSCompositeCopy, NSGraphicsContext, NSCalibratedRGBColorSpace, NSBitmapImageRep, NSImage, NSImageNameComputer | |
dimension = 512 | |
size = NSMakeSize(dimension, dimension) | |
rect = NSMakeRect(0, 0, dimension, dimension) | |
image = NSImage.imageNamed_(NSImageNameComputer) | |
image.setSize_(size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: This still pops a dialog... I can't seem to figure out how to -Force it to not show. | |
function Set-DefaultBrowser { | |
[CmdletBinding(SupportsShouldProcess = $true)] | |
param( | |
[Parameter(Mandatory = $true)] | |
$BrowserId | |
) | |
$pythonScript = @" | |
from LaunchServices import LSSetDefaultHandlerForURLScheme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python | |
from LaunchServices import LSSetDefaultHandlerForURLScheme | |
from LaunchServices import LSSetDefaultRoleHandlerForContentType | |
# 0x00000002 = kLSRolesViewer | |
# see https://developer.apple.com/library/mac/#documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/tdef/LSRolesMask | |
LSSetDefaultRoleHandlerForContentType("public.html", 0x00000002, "com.operasoftware.operanext") | |
LSSetDefaultRoleHandlerForContentType("public.xhtml", 0x00000002, "com.operasoftware.operanext") | |
LSSetDefaultHandlerForURLScheme("http", "com.operasoftware.operanext") | |
LSSetDefaultHandlerForURLScheme("https", "com.operasoftware.operanext") |
a. Boot into recovery using command-R
during reboot, wipe the harddrive using Disk Utility, and select reinstall macOS
b. Initial installation will run for approximately 1 hour, and reboot once
c. It will then show a remaining time of about 10-15 minutes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import plistlib | |
import subprocess | |
from Cocoa import NSBundle | |
if (len(sys.argv) == 2): | |
model = sys.argv[1] | |
else: |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img
) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config
to:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
maxconn 2048 | |
defaults | |
mode http | |
timeout connect 5000ms | |
timeout client 90000ms | |
timeout server 90000ms | |
frontend secure-http-in |
NewerOlder