Skip to content

Instantly share code, notes, and snippets.

View shukla2112's full-sized avatar
👋
Hi!

Nikunj Shukla shukla2112

👋
Hi!
View GitHub Profile
@mmasko
mmasko / UbuntuCFinit.yaml
Last active October 20, 2021 01:41
Configure cfn-hup, cloudformation tools on ubuntu 18. Based on a gist from https://gist.github.com/kixorz/10194688. Written in YAML.
#This script will install the cloudformation helper work on Ubuntu 18.
#Some values are hard coded. Make sure to update where needed, or add to the parameters section.
#This would probably work on other distros, but I have not tested yet. Try it out.
#Just make sure to change things like apt to yum if trying on another OS.
Parameters:
EnvironmentSize:
Type: String
Default: t3.nano
AllowedValues:
- t3.nano
@Ryanb58
Ryanb58 / install.md
Last active June 25, 2024 19:59
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@bojand
bojand / index.md
Last active July 15, 2024 02:51
gRPC and Load Balancing

Just documenting docs, articles, and discussion related to gRPC and load balancing.

https://github.com/grpc/grpc/blob/master/doc/load-balancing.md

Seems gRPC prefers thin client-side load balancing where a client gets a list of connected clients and a load balancing policy from a "load balancer" and then performs client-side load balancing based on the information. However, this could be useful for traditional load banaling approaches in clound deployments.

https://groups.google.com/forum/#!topic/grpc-io/8s7UHY_Q1po

gRPC "works" in AWS. That is, you can run gRPC services on EC2 nodes and have them connect to other nodes, and everything is fine. If you are using AWS for easy access to hardware then all is fine. What doesn't work is ELB (aka CLB), and ALBs. Neither of these support HTTP/2 (h2c) in a way that gRPC needs.

@takeit
takeit / INSTALL.md
Last active March 23, 2024 19:03
Write to NTFS on macOS Sierra (osxfuse + ntfs-3g)
  1. Install osxfuse:
brew cask install osxfuse
  1. Reboot your Mac.

  2. Install ntfs-3g:

@gibrown
gibrown / index-data.sh
Created February 15, 2017 16:48
Populate an Elasticsearch index from bash and json files
#!/bin/bash
# To prep a file for this script:
# - take a list of docs orig.json with one json doc per line
# - run: split -l 1000 orig.json orig-split
export ESINDEX="$1" #ES index name
export ESTYPE="$2" #ES document type name
JSONFILE="$3" #JSON file path name. One doc per line.
@bernays
bernays / assignEIP.js
Last active February 22, 2020 12:20
Lambda-Assign-EIP-Lifecyclehook
/*Problem: Integration into 3rd party API requires IP whitelisting. Servers are dynamically started and stopped.
Solution: assign predefined EIPs to EC2 instances as the Auto Scaling group size increases
Limitations: Need to predefine and preallocate all IP addresses
Other possible solutions:
1) Proxy all requests through single NAT instance
i. limitation: single point of failure
ii. need similar solution to make sure NAT is highly available
2) Remove whitelisting requirement
i. no...just no ... not gonna happen
@amankrbl
amankrbl / Graylog_maintenance.md
Last active March 16, 2016 08:01
Graylog Scale up

Elasticsearch cluster scale out

  • Remove one elastic search node from the cluster to create AMI

      curl -XPUT localhost:9200/_cluster/settings -d '{
        "transient" :{
            "cluster.routing.allocation.exclude._ip" : "10.0.0.1"
    

}

@devdazed
devdazed / slack-pagerduty-oncall.py
Last active April 18, 2024 10:28
Updates a Slack User Group with People that are on call in PagerDuty
#!/usr/bin/env python
from __future__ import print_function
import json
import logging
from urllib2 import Request, urlopen, URLError, HTTPError
from base64 import b64decode