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/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 file partSizeInMb"; | |
exit 0; | |
fi | |
file=$1 | |
if [ ! -f "$file" ]; then |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"Federated": "arn:aws:iam::MY_AWS_ACCOUNT_ID:oidc-provider/MY_PROVIDER_URL" | |
}, | |
"Action": "sts:AssumeRoleWithWebIdentity", | |
"Condition": { |
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
require 'net/http' | |
errors = 0 | |
successes = 0 | |
begin | |
Kernel.loop do | |
begin | |
request = Net::HTTP.get_response("35.236.26.249", "/productpage") | |
if request.is_a?(Net::HTTPSuccess) |
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
``` | |
echo | openssl s_client -showcerts -servername google.com -connect google.com:443 | |
``` |
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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: hello-1 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hello-1 |
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
openssl x509 -in certificate.crt -text -noout |
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
openssl req -x509 -out localhost.crt -keyout localhost.key \ | |
-newkey rsa:2048 -nodes -sha256 \ | |
-subj '/CN=localhost' -extensions EXT -config <( \ | |
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") |
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
RG7RUXhgLBbmWwoWfakQwjaPugnbJDMEZ3 |
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
class SidekiqTestWorker | |
include Sidekiq::Worker | |
def perform | |
Rails.logger.info "+++ Hello lolcats" | |
sleep 0.950 | |
puts "wat" | |
Rails.logger.info "+++ LOLCAT DONE" | |
end | |
end |
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
# Goal: put a non-Rails-aware Ruby library using normal `require`s in | |
# lib/mything. Have it transparently reloaded between requests like Rails app | |
# code is. | |
# | |
# The code here goes inside of your configure block in | |
# config/environments/development.rb. There are two parts, commented inline. | |
# Disable reload_classes_only_on_change. This makes Rails invoke the reloader | |
# even if no source files are changed. This is necessary because the autoloader | |
# and reloader don't know about our library, so they won't know to trigger a |
NewerOlder