Skip to content

Instantly share code, notes, and snippets.

View getsetbro's full-sized avatar
💭
[ bro-lite ]

Seth Broweleit getsetbro

💭
[ bro-lite ]
View GitHub Profile
@getsetbro
getsetbro / bookmarlets.js
Created December 17, 2020 17:21 — forked from edo9k/bookmarlets.js
Some of my homegrown bookmarlets.
/*
* Bookmarklets are a bit of a lost art these days,
* most people don't even know they exist anymore.
* They are lighter than any "extension", and can
* still perform really complex actions. Writing
* them is also a good way to flex your DOM/JS skills.
*/
// opens current URL on the Way Back Machine. It works on most cases.
javascript:(function(){if(document.URL === "data:text/html,chromewebdata" || document.URL === "chrome-error://chromewebdata/"){location.href='http://web.archive.org/web/*/'+loadTimeData.data_.summary.failedUrl;}else{location.href='http://web.archive.org/web/*/'+document.URL;}}())
@getsetbro
getsetbro / minimal_zshrc_0.sh
Last active December 13, 2020 03:36 — forked from njgibbon/minimal_zshrc_0.sh
Minimal .zshrc to output git branch name in prompt.
# ~/.zshrc
# Find and set branch name var if in git repository.
function git_branch_name()
{
branch=$(git symbolic-ref HEAD 2> /dev/null | awk 'BEGIN{FS="/"} {print $NF}')
if [[ $branch == "" ]];
then
:
else
@getsetbro
getsetbro / spcontext.js
Last active October 16, 2017 15:42 — forked from phillipharding/aspnetmvc-spcontext.js
spcontext.js without jquery
/*!spcontext*/
(function (window, undefined) {
"use strict";
//var $ = window.jQuery;
var document = window.document;
// SPHostUrl parameter name
var SPHostUrlKey = "SPHostUrl";

New computer setup


Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS