Skip to content

Instantly share code, notes, and snippets.

@gabrielsoule
gabrielsoule / tweet_dumper.py
Created February 7, 2017 07:28
Updated version of yanofsky/5436496
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
access_secret = ""
@bobbytables
bobbytables / build.sh
Created February 18, 2017 15:49
Protocol Buffer build script for multiple folders
#!/usr/bin/env bash
# This script is meant to build and compile every protocolbuffer for each
# service declared in this repository (as defined by sub-directories).
# It compiles using docker containers based on Namely's protoc image
# seen here: https://github.com/namely/docker-protoc
set -e
REPOPATH=${REPOPATH-/opt/protolangs}
CURRENT_BRANCH=${CIRCLE_BRANCH-"branch-not-available"}
@eruvanos
eruvanos / README.md
Last active October 11, 2024 22:14
Simple mock server for testing using Flask

Mock server for testing using flask

License

MIT

Prepare

Install flask and requests to run this example.

# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=mybinary
BINARY_UNIX=$(BINARY_NAME)_unix

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.
@kunanit
kunanit / ecs.py
Last active February 7, 2020 16:39
Django settings for ECS (awsvpc network mode)
"""
AWS ECS django settings
"""
import requests
from .settings import * # may look different for your project
def get_ecs_task_ips():
"""
---
apiVersion: v1
data:
elasticsearch.yml: |-
cluster.name: elasticsearch
node.data: ${NODE_DATA:true}
node.master: ${NODE_MASTER:true}
node.ingest: ${NODE_INGEST:true}
node.name: ${HOSTNAME}
@cocopon
cocopon / slack-sidebar-iceberg
Last active May 26, 2023 12:06
Iceberg for Slack
#1E2132,#2A3158,#C6C8D1,#161821,#2A3158,#C6C8D1,#B4BE82,#E27878
all-pods() {
FZF_DEFAULT_COMMAND='
(echo CONTEXT NAMESPACE NAME READY STATUS RESTARTS AGE
for context in $(kubectl config get-contexts --no-headers -o name | sort); do
kubectl get pods --all-namespaces --no-headers --context "$context" | sed "s/^/${context%-context} /"
done) 2> /dev/null | column -t
' fzf --info=inline --layout=reverse --header-lines=1 --border \
--prompt 'all-pods> ' \
--header $'╱ Enter (kubectl exec) ╱ CTRL-O (open log in editor) ╱ CTRL-R (reload) ╱\n\n' \
--bind ctrl-/:toggle-preview \