Skip to content

Instantly share code, notes, and snippets.

View jasonco-dev's full-sized avatar

Jason Camacho jasonco-dev

  • Guaynabo, Puerto Rico
View GitHub Profile

Both things have been introduced recently, and let you access even private ec2 instances

  1. Without VPN
  2. No open SSH port
  3. Authentication / Authorization is fully delegated to IAM
# Assumes valid AWS Credentials in ENV
@usrbinkat
usrbinkat / DockerComposeInstall.md
Last active August 22, 2024 20:47 — forked from deirdre-anderson/DockerComposeInstall.md
Sample Docker Compose for a Kong EE insallation

Local Kong EE Hybrid Install with Docker-compose

Before

  • Confirm you have Docker and Docker compose installed

  • Create a environment var for you Kong License, KONG_LICENSE_DATA

  • Create a file with your json license

  • Create your environment variable KONG_LICENSE_DATA from the above file

Both things have been introduced recently, and let you access even private ec2 instances

  1. Without VPN
  2. No open SSH port
  3. Authentication / Authorization is fully delegated to IAM
# Assumes valid AWS Credentials in ENV
@rajinder-yadav
rajinder-yadav / nodejs-https-requests.js
Last active October 26, 2023 18:55
Node.js making a HTTPS request with GET and POST
const https = require('https');
async function httpsGet(hostname, path, headers) {
return new Promise(async (resolve, reject) => {
const options = {
hostname: hostname,
path: path,
port: 443,
method: 'GET',
@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active March 15, 2025 03:36
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@diegoparrilla
diegoparrilla / cloudflare-workers-block-blacklisted.js
Created May 11, 2018 15:16
Using Cloudflare Workers and https://Apility.io API to block access to the pages filtered if the IP belongs to a blacklisted IP address of the service
addEventListener('fetch', event => {
event.respondWith(fetchAndCheckOrigin(event.request))
})
async function fetchAndCheckOrigin(req) {
try {
const body = await req.body;
const ip = req.headers.get('cf-connecting-ip');
const apilityio = await fetch('https://api.apility.net/badip/' + ip + '?token=APILITY_IO_API_KEY');

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at [email protected] or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@saiteja09
saiteja09 / script.py
Created November 6, 2017 16:17
Glue Job Script for reading data from DataDirect Salesforce JDBC driver and write it to S3
import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.dynamicframe import DynamicFrame
from awsglue.job import Job
args = getResolvedOptions(sys.argv, ['JOB_NAME'])
@shieldwed
shieldwed / http_server.py
Created October 14, 2017 21:01
A simple python HTTP server which responds with the original request headers and request path
#!/usr/bin/env python
from http.server import BaseHTTPRequestHandler, HTTPServer
# HTTPRequestHandler class
class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
# GET
def do_GET(self):
# Send response status code
@cbcafiero
cbcafiero / replacements.py
Last active November 3, 2022 09:00
Easy multiple search and replace by tag and attribute with BeautifulSoup
"""
Sometimes you want to make several different replacements. Search by tag with
optional attributes. Replace with tag with optional attributes.
Thank you to Dan @ University of Exeter for bug fix
"""
from bs4 import BeautifulSoup
REPLACEMENTS = [('b', {}, 'strong', {}),