Random query recipes of JMESPath for the AWS CLI tools that I might have written or stumbled upon.
This file contains hidden or 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
# Copyright 2018 Marketplacer under the MIT license. | |
class CapybaraTimers | |
class << self | |
attr_accessor :nesting, :total_time | |
def setup | |
# Wrap every DSL method and every matcher with our timing function | |
Capybara::Session::DSL_METHODS.each do |name| | |
setup_timer_on_method(Capybara::DSL, name) | |
end |
This file contains hidden or 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
{ | |
"clients": { | |
"Geth": { | |
"version": "1.7.3", | |
"platforms": { | |
"linux": { | |
"x64": { | |
"download": { | |
"url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.7.3-4bb3c89d.tar.gz", | |
"type": "tar", |
This file contains hidden or 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
a4b.amazonaws.com | |
access-analyzer.amazonaws.com | |
account.amazonaws.com | |
acm-pca.amazonaws.com | |
acm.amazonaws.com | |
airflow-env.amazonaws.com | |
airflow.amazonaws.com | |
alexa-appkit.amazon.com | |
alexa-connectedhome.amazon.com | |
amazonmq.amazonaws.com |
This file contains hidden or 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
Domain: TEST.local | |
User Enumeration: | |
Windows: | |
net user | |
net user /domain | |
net user [username] | |
net user [username] /domain | |
wmic useraccount | |
Mac: | |
dscl . ls /Users |
This file contains hidden or 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
# Configure WinRM settings | |
Write-Host 'Configuring WinRM' | |
# Make 100% sure we prevent Packer from connecting to WinRM while we | |
# attempt to configure everything | |
Disable-NetFirewallRule -DisplayGroup 'Windows Remote Management' | |
Write-Host '* Setting the WinRM Service start up type to Automatic' | |
Set-Service -Name WinRM -StartupType Automatic |
This file contains hidden or 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/bash -e | |
yum update -y | |
yum install -y aws-cfn-bootstrap git aws-cli | |
# Install the files and packages from the metadata | |
/opt/aws/bin/cfn-init -v --stack "{{ aws_stack_name }}" \ | |
--resource ECSInstanceLaunchConfiguration \ | |
--configsets ConfigCluster \ | |
--region "{{ ref('AWS::Region') }}" |
This file contains hidden or 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
import * as React from 'react'; | |
import styles from './app.css'; | |
import { fa, fa_question } from './icons'; | |
console.log(fa); | |
const App = () => { | |
return ( | |
<div> | |
<h1 className={styles.highlight}><span className={[fa, fa_question].join(' ')} /> React with font-awesome... like a boss!</h1> | |
</div> |
This file contains hidden or 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
POINTS = { | |
"A" => 1, "B" => 3, "C" => 3, "D" => 2, | |
"E" => 1, "F" => 4, "G" => 2, "H" => 4, | |
"I" => 1, "J" => 8, "K" => 5, "L" => 1, | |
"M" => 3, "N" => 1, "O" => 1, "P" => 3, | |
"Q" => 10, "R" => 1, "S" => 1, "T" => 1, | |
"U" => 1, "V" => 4, "W" => 4, "X" => 8, | |
"Y" => 4, "Z" => 10 | |
} |
I'll often use branches to try out experiments, ideas, and to separate different trains of thought. Not every branch gets merged – in fact, it's quite common for me to make several commits on a branch, look at the end result, and throw the branch away without ever merging it (branching is cheap and ideas are cheap, but bad code is expensive). As a result, I can end up with a lot of branches. This makes the output of git branch
difficult to sort through:
$ git branch
* account-org-association
acdx-blog-posts
add-static-resource-support
alter-component-naming