Making a *bold statement.*
Emphasis with _italic text._
Let's ~strike out~ post this message.
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
# Generate private key with passphrase | |
openssl genrsa -des3 -out server.key 2048 | |
# Private key without passpharase; UNDERSTAND THE RISK! | |
openssl rsa -in server.key -out server.key-nopass | |
# Generate CSR to submit to CA | |
openssl req -new -sha256 -key server.key -out server.csr | |
# Check/view CSR |
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
redis-cli KEYS "Sidekiq:*:stat:processed:*" | xargs -n 100 redis-cli DEL |
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
# See: https://rvm.io/rvm/install | |
# Install public key | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
# Single-user install | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby | |
# Multi-user install; after install, add users to "rvm" group | |
\curl -sSL https://get.rvm.io | sudo bash -s stable |
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
function getLambdaEventSource(event) { | |
if (event.Records && event.Records[0].cf) return 'isCloudfront'; | |
if (event.configRuleId && event.configRuleName && event.configRuleArn) return 'isAwsConfig'; | |
if (event.Records && (event.Records[0].eventSource === 'aws:codecommit')) return 'isCodeCommit'; | |
if (event.authorizationToken === "incoming-client-token") return 'isApiGatewayAuthorizer'; | |
if (event.StackId && event.RequestType && event.ResourceType) return 'isCloudFormation'; |
Firebase REST queries require access_token
parameter for full access. This is Google’s OAuth 2.0 for service accounts.
- https://firebase.google.com/docs/reference/rest/database/user-auth
- https://developers.google.com/identity/protocols/OAuth2ServiceAccount
- Firebase Console > Settings > Project settings > Service accounts tab
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
# | |
# Build and Package RubyGems for AWS Lambda Layer Use | |
# | |
all: build package | |
build: | |
gem i firebase-ruby -Ni ruby/gems/2.5.0 | |
gem i darksky-ruby -Ni ruby/gems/2.5.0 | |
ls -m ruby/gems/2.5.0/gems |
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":2, | |
"path":"/event", | |
"httpMethod":"GET", | |
"headers":{ | |
"Content-Length":"0", | |
"Host":"abcde12345.execute-api.us-west-2.amazonaws.com", | |
"User-Agent":"curl/7.54.0", | |
"X-Amzn-Trace-Id":"Root=1-67891233-abcdef012345678912345678", | |
"X-Forwarded-For":"192.168.1.23", |
OlderNewer