Skip to content

Instantly share code, notes, and snippets.

@iamdvr
iamdvr / GoogleIpMaskToOpenvpnSubnetMask.java
Created July 3, 2021 10:10
Google Internet Ip Ranges of IpMask To Openvpn Subnet Mask
// Example with java version 11
// java GoogleIpMaskToOpenvpnSubnetMask.java
// --route 8.8.4.0 255.255.255.0 net_gateway 300 --route 8.8.8.0 255.255.255.0 net_gateway 300 --route 8.34.208.0 255.255.240.0 net_gateway 300 --route 8.35.192.0 255.255.240.0 net_gateway 300 --route 23.236.48.0 255.255.240.0 net_gateway 300 --route 23.251.128.0 255.255.224.0 net_gateway 300 --route 34.64.0.0 255.192.0.0 net_gateway 300 --route 34.128.0.0 255.192.0.0 net_gateway 300 --route 35.184.0.0 255.248.0.0 net_gateway 300 --route 35.192.0.0 255.252.0.0 net_gateway 300 --route 35.196.0.0 255.254.0.0 net_gateway 300 --route 35.198.0.0 255.255.0.0 net_gateway 300 --route 35.199.0.0 255.255.128.0 net_gateway 300 --route 35.199.128.0 255.255.192.0 net_gateway 300 --route 35.200.0.0 255.248.0.0 net_gateway 300 --route 35.208.0.0 255.240.0.0 net_gateway 300 --route 35.224.0.0 255.240.0.0 net_gateway 300 --route 35.240.0.0 255.248.0.0 net_gateway 300 --route 64.15.112.0 255.255.240.0 net_gateway 300 --route 64.233.160.0 255.255.224.
@iamdvr
iamdvr / jks-to-nginx-command-list
Created April 25, 2019 12:08 — forked from pjosalgado/jks-to-nginx-command-list
How to convert Java Key Store file to pem/key for NGINX.
1. Convert our ".jks" file to ".p12" (PKCS12 keystore format):
keytool -importkeystore -srckeystore { java-keystore.jks } -destkeystore { pkcs12-keystore.p12 } -deststoretype PKCS12
2. Extract pem (certificate) from ".p12" keystore file:
openssl pkcs12 -nokeys -in { pkcs12-keystore.p12 } -out { certificate-chain.pem }
3. Extract unencrypted key file from ".p12" keystore file:
openssl pkcs12 -nocerts -nodes -in { pkcs12-keystore.p12 } -out { unencrypted-key.key }
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<textarea rows="10" cols="50" name="console">N/A</textarea>
<input type="button" onclick="javascript:callSomeAsyncThing();" value="ClickMe" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<textarea rows="10" cols="50" name="console">N/A</textarea>
<input type="button" onclick="javascript:callSomeAsyncThing();" value="ClickMe" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<textarea rows="10" cols="50" name="console">N/A</textarea>
<input type="button" onclick="javascript:callSomeAsyncThing();" value="ClickMe" />
@iamdvr
iamdvr / README.md
Created March 11, 2018 11:29 — forked from faermanj/README.md
AWS Well Architected: Performance Efficiency Notes

Video: https://www.twitch.tv/videos/177667117

PERF 1. How do you select the best performing architecture?

"In God we trust, all others bring data" W. Edwards Deming

Performance 👎

  • Latency
  • Throughput
  • Latency ⍺ Concurrent Users
@iamdvr
iamdvr / README.md
Created March 11, 2018 11:27 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

OP: @leonardofed founder @ plainflow.


@iamdvr
iamdvr / 0-README.md
Created March 11, 2018 11:27 — forked from leonardofed/0-README.md
AWS Lambda: Advanced Coding Session - clda.co/aws-lambda-webinar

AWS Lambda: Advanced Coding Session (slides)

Live demos:

  1. Amazon API Gateway Access Control
  2. Amazon Kinesis Streams processing
  3. Amazon Cognito Sync trigger
  4. AWS CloudFormation Custom Resources