Skip to content

Instantly share code, notes, and snippets.

View stevengonsalvez's full-sized avatar
💭
trying to be monkish

Steven Gonsalvez stevengonsalvez

💭
trying to be monkish
View GitHub Profile

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@stevengonsalvez
stevengonsalvez / account_client.go
Created February 21, 2023 16:44 — forked from sebnyberg/account_client.go
Some Azure Go SDK auth things
package azurex
import (
"context"
"errors"
"fmt"
"os"
"strings"
"github.com/Azure/azure-sdk-for-go/profiles/2020-09-01/resources/mgmt/subscriptions"
@stevengonsalvez
stevengonsalvez / obsidian-web-clipper.js
Last active January 6, 2023 22:52 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */

Using Azure CLI to add cert and hostname to web apps

These notes assume that you already have an app service plan running a number of sites (web apps) that ALL want the same wildcard cert.

The problem being solved was how to point a number of sites to a company domain.

The aliases (e.g. alias trainer.foo-uk.com onto CNAME pvb-live-eun-trainer-as.azurewebsites.net) MUST already be configured in DNS -- Azure will check!

First, how to get the interesting App Service Plan

@stevengonsalvez
stevengonsalvez / jq-cheetsheet.md
Created April 11, 2022 10:07 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@stevengonsalvez
stevengonsalvez / user.py
Created May 9, 2021 07:08 — forked from psa-jforestier/user.py
List all inactive user of a GitHub organization using GitHub API
'''
List all inactive user of a GitHub organization
See user.py --help for usage.
Partially inspired by https://gist.github.com/morido/9817399
'''
import sys # to use sys.stdout
import os
from datetime import datetime
from time import strftime
import datetime
@stevengonsalvez
stevengonsalvez / lazy_users.py
Created April 26, 2021 10:02 — forked from morido/lazy_users.py
detect non-contributors in an organization
#!/usr/bin/env python
# you will need http://github3py.readthedocs.org/en/latest/#installation
# I'm not sure if this works on Windows due to the use of strptime()
from github3 import login
import datetime
import json
# Amend the following two lines as necessary
@stevengonsalvez
stevengonsalvez / example.md
Created April 21, 2021 09:33 — forked from mbohun/example.md
simple BASH/curl scipt for github REST API (HTTP GET queries)
$ ./githubapi-get.sh $GITHUBTOKEN /users/mbohun/repos
HTTP/1.1 200 OK
Server: GitHub.com
Date: Wed, 04 Mar 2015 04:30:29 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 155683
Status: 200 OK
@stevengonsalvez
stevengonsalvez / steve-yegge-platform-rant-follow-up.md
Created April 8, 2021 15:17 — forked from kislayverma/steve-yegge-platform-rant-follow-up.md
The one after platforms where Steve Yegge shares Amazon war stories

By Steve Yegge

Last week I accidentally posted an internal rant about service platforms to my public Google+ account (i.e. this one). It somehow went viral, which is nothing short of stupefying given that it was a massive Wall of Text. The whole thing still feels surreal.

Amazingly, nothing bad happened to me at Google. Everyone just laughed at me a lot, all the way up to the top, for having committed what must be the great-granddaddy of all Reply-All screwups in tech history.

But they also listened, which is super cool. I probably shouldn’t talk much about it, but they’re already figuring out how to deal with some of the issues I raised. I guess I shouldn’t be surprised, though. When I claimed in my internal post that “Google does everything right”, I meant it. When they’re faced with any problem at all, whether it’s technical or organizational or cultural, they set out to solve it in a first-class way.

Anyway, whenever something goes viral, skeptics start wondering if it was faked or staged. My accident

@stevengonsalvez
stevengonsalvez / steve-yegge-google-platform-rant.md
Created April 8, 2021 13:49 — forked from kislayverma/steve-yegge-google-platform-rant.md
A copy (for posterity) of Steve Yegge's internal memo in Google about what platforms are and how Amazon learnt to build them

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't really have SREs and they make engineers pretty much do everything,