Skip to content

Instantly share code, notes, and snippets.

View Puneeth-n's full-sized avatar
💭
git clean -ffdx

Puneeth Puneeth-n

💭
git clean -ffdx
View GitHub Profile

Geneve tunnels using netlink examples

Scenario A - pointing to an interface as the next hop

Host A configuration (eth0 - 192.168.1.191):

# Remote Address is the IP of Host B eth0
sudo ip link add name geneve0 type geneve id 1000 remote 192.168.1.192
sudo ip link set geneve0 up
sudo ip addr add 10.200.1.1/32 dev geneve0
@prologic
prologic / LearnGoIn5mins.md
Last active April 30, 2024 15:10
Learn Go in ~5mins
@kekru
kekru / 01nginx-tls-sni.md
Last active April 1, 2024 02:29
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@drmalex07
drmalex07 / README-vagrant-add-disk.md
Last active October 12, 2021 07:01
A Vagrant recipe to attach more hard disk drives to a VM. #vagrant #virtualbox #hard-disk #hdd #storage

README - Add a hard disk (block device) to a vagrant box

Create disk image

Create using the VDI format (will allocate space lazily). For example:

vboxmanage createmedium --filename $PWD/disk-2.vdi --size 1024 --format VDI 

Configure VM

@quiver
quiver / iam-policy.json
Last active April 23, 2024 07:02
How to connect to Amazon RDS PostgreSQL with IAM credentials
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds-db:connect"
],
"Resource": [
"arn:aws:rds-db:region:account-id:dbuser:dbi-resource-id/database-user-name"
import boto3
import io
import zipfile
import json
from moto import mock_sqs, mock_sns, mock_lambda, mock_iam
import os
def _process_lambda(func_str):
zip_output = io.BytesIO()
@EvilBeaver
EvilBeaver / cleanupJenkinsWorkspaces.groovy
Last active October 18, 2023 10:15 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;

The information below was written in Oct 2017. In August 2019 AWS launched official support for multiple target groups per AWS ECS service. Please use that feature instead!


Unfortunately as of writing this (Oct 18, 2017) there is no built in integration for multiple target groups per AWS ECS service. Here are a few things you can try:

  1. If your application just serves port 80 (HTTP) & port 443 (HTTPS) then you should consider using the application load balancer and terminating SSL at the load balancer. This will allow your application to function using just port 80.
@primaryobjects
primaryobjects / 1-nightwatch.md
Last active August 18, 2022 13:56
Running Nightwatch automated testing with Selenium on Windows. Quick-start setup.
  1. Install the chromedriver package via:
npm install chromedriver --save

or install with a local binary via:

npm install chromedriver --chromedriver_filepath=C:\\YOUR_PROJECT_PATH\\chromedriver.zip
@jgraglia
jgraglia / Jenkinsfile
Created July 11, 2017 10:38
Extended Choice Plugin in Jenkins pipeline
// YOU HAVE TO :
// 1. install the Extended Choice Parameter Plugin : https://wiki.jenkins.io/display/JENKINS/Extended+Choice+Parameter+plugin
// 2. Allow the instanciation of ExtendedChoiceParameterDefinition in you script approval admin page https://myjenkins/scriptApproval/
List params = []
List props = []
// https://github.com/jenkinsci/extended-choice-parameter-plugin/blob/master/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java#L427
// https://issues.jenkins-ci.org/browse/JENKINS-34617