Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am patricksanders on github.
  • I am patricksanders (https://keybase.io/patricksanders) on keybase.
  • I have a public key whose fingerprint is C7D5 6A1F 1590 4160 6F7D 2B2E 310A CA60 2E27 A12A

To claim this, I am signing this object:

via @rob_rix (https://twitter.com/rob_rix/status/1073199812844097536)

Mentoring is challenging. You have to:

  • be mindful of the power gradient between yourself and your mentee;
  • be mindful of your mentee’s current level of understanding;
  • provide context around why, and not just what things are done;
  • come up with explanations on the fly;
  • let your mentee make mistakes so they can learn to diagnose & recover from them;
  • give them challenges that are just outside their current reach;
@patricksanders
patricksanders / summarize.py
Created January 31, 2020 16:46
Summarize IAM policy with policy_sentry
import json
from policy_sentry.analysis.analyze import analyze_by_access_level, determine_actions_to_expand
from policy_sentry.shared.database import connect_db
DB_SESSION = connect_db('bundled') # Use the bundled data that comes with Policy Sentry
sample_policy = json.loads("""
{
"Statement":[
# set aliases
. ~/.bash_aliases
new-alias() {
local last_command=$(echo `history |tail -n2 |head -n1` | sed 's/[0-9]* //')
echo alias $1="'""$last_command""'" >> ~/.bash_aliases
. ~/.bash_aliases
}
@patricksanders
patricksanders / slack_tweaks.md
Created October 20, 2023 17:05 — forked from Kenny-MWI/slack_tweaks.md
Slack Tweaks

Slack Tweaks

In Fall 2023, Slack introduced an updated client with some unpopular UI changes. The tweaks in this document can be used to revert to the old client or hide the new side bar. These will reset every time you fully close Slack but they are easy to re-apply once you get the hang of it.

The fist step is to enable dev mode, which can be accomplished by setting a system-wide environment variable.

(Mac OS) Enable Dev Mode

  1. Close the Slack app (command + Q)
  2. Open the terminal and run these two commands separately: