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/sh | |
# | |
# Backup the users and groups from your AWS IAM Identity | |
# Center (successor to AWS SSO) identity store. | |
# | |
# I wrote this because I initially modeled permission sets | |
# in Pulumi, before the AWS SSO API existed. This script | |
# is a handy way to grab a backup before doing potentially | |
# dangerous operations until I import users/groups into Pulumi. | |
# |
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
log_format json | |
'{' | |
' "path":"/var/log/nginx/access_log.json","type":"http",' | |
' "clientip":"$remote_addr","ident":"-","auth":"$remote_user",' | |
' "timestamp":"$time_local","verb":"$request_method",' | |
' "request":"$request_uri","request_path":"$uri",' | |
' "http_version":"$server_protocol","response":"$status",' | |
' "bytes":"$body_bytes_sent",' | |
' "referrer":"$http_referer","agent":"$http_user_agent",' | |
' "xff":"$http_x_forwarded_for","request_time":"$request_time",' |
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
-- Set sound output, adapted from https://discussions.apple.com/message/20676485 | |
-- | |
-- Run as: | |
-- osascript Speakers.scpt -- Default to "Internal Speakers" | |
-- osascript Speakers.scpt "DELL P2715Q" -- Anything listed in System Preferences, | |
-- -- e.g. Monitor connected via HDMI | |
on run argv | |
set asrc to "Internal Speakers" | |
if (count of argv) > 0 then | |
set asrc to item 1 of argv |