Skip to content

Instantly share code, notes, and snippets.

View jonathanweinberg's full-sized avatar

Jonathan Weinberg jonathanweinberg

View GitHub Profile

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@jonathanweinberg
jonathanweinberg / osx_setup.md
Created February 9, 2024 22:02 — forked from millermedeiros/osx_setup.md
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@jonathanweinberg
jonathanweinberg / modify_screensharing.sh
Created June 10, 2023 02:08 — forked from timsutton/modify_screensharing.sh
Enabling screen sharing on macOS Monterey as of 12.1 beta 2
#!/bin/bash
# A cleaner alternative to this approach, but which requires a restart, is to populate TCC's SiteOverrides.plist inside
# the TCC app support directory with the following:
# <?xml version="1.0" encoding="UTF-8"?>
# <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
# <plist version="1.0">
# <dict>
# <key>Services</key>
# <dict>
@jonathanweinberg
jonathanweinberg / download_all_tweets.go
Created June 10, 2023 02:05 — forked from stefanschmidt/download_all_tweets.go
Download all tweets of a user without requiring an API key
// To my knowledge the only solution available that:
// - does not require an API key with "elevated access" (most other solutions need this, requires an application)
// - does not require an API key with "essential access" (requires a valid cell phone number to enable)
// - does not require any type of API key
// - isn't outdated or otherwise broken
//
// Can (probably) download up to 3200 tweets
//
// brew install go
// go run download_all_tweets.go
# Copyright 2014 Chris Cohen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

Restoring an utterly destroyed DFSR-replicated SYSVOL from backup

Warning: this is not official Microsoft documentation and some of these steps might not actually be supported.

This guide is provided "as is", without warranty of any kind, express or implied. In no event shall the authors or copyright holders be liable for any claim, damages or other liability arising from, out of or in connection with applying the steps outlined in this guide.

When to use

@jonathanweinberg
jonathanweinberg / VirtualBoyGo.ps1
Last active June 4, 2019 04:25 — forked from BenMcLean/VirtualBoyGo.ps1
VirtualBoyGo powershell
## Setting ErrorAction
$ProgressPreference = "SilentlyContinue" # Progress bar can significantly impact Invoke-WebRequest cmdlet performance, see issue: https://github.com/PowerShell/PowerShell/issues/2138
## Module Import
Import-Module Microsoft.PowerShell.Archive
## Setting Variables
####$path = Split-Path -Parent $PSCommandPath
$path = 'c:\temp'
$mobileSdk = 'ovr_sdk_mobile_1.23.zip'
$mobileSdkFolder = [io.path]::GetFileNameWithoutExtension("$mobileSdk")
@jonathanweinberg
jonathanweinberg / LogFile.udl.xml
Created January 3, 2019 16:05 — forked from mmdemirbas/LogFile.udl.xml
Custom log file syntax highlighting for Notepad++
<NotepadPlus>
<UserLang name="LogFile" ext="log">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">[(0])0</Keywords>
<Keywords name="Folder+"></Keywords>

Keybase proof

I hereby claim:

To claim this, I am signing this object:

############################################################################################################
# Get-ConsoleAsHtml.ps1
#
# The script captures console screen buffer up to the current cursor position and returns it in HTML format.
#
# Returns: UTF8-encoded string.
#
# Example:
#
# $htmlFileName = "$env:temp\ConsoleBuffer.html"