Skip to content

Instantly share code, notes, and snippets.

View AvnerCohen's full-sized avatar
🌍
Working from home

Avner Cohen AvnerCohen

🌍
Working from home
View GitHub Profile
import boto3
import json
import csv
import datetime
from pkg_resources import resource_filename
ReportFile = './report.csv'
CpuThreshold = 40 # If we reduce instance size, CPU utilization will be twice. e.g. 40*2=80% CPU utilization
# EC2 filter, we will skip terminated instances
@look4regev
look4regev / basic_mac_setup.sh
Last active July 31, 2019 14:47
Installs basic dev tools for MacOS
#!/bin/bash
echo "Installing brew (MacOS package manager)"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing needed tools for development"
brew install gcc asdf coreutils gpg zlib mongodb rabbitmq yarn libxmlsec1 git cask zsh pkg-config readline openssl
echo "Install python and node with asdf"
source /usr/local/opt/asdf/asdf.sh
@rantav
rantav / call for moderators.md
Last active March 29, 2018 06:30
Reversim Summit 2018 is looking for moderators

Dear all, we’re starting to work on Reversim Summit 2018, which will take place Oct 8-9 in University of Tel Aviv. We’re gathering the moderation team led by Shlomi Noach (the content Tzar) and are about to open the CFP soon. Reversim Summit is a community effort and as such we tentatively* invite you to join our team of moderators.

Please email us at rs18-team@googlegroups.com to state your interest and provide credentials (e.g professional background, speaking and moderation experience)

If you’re interested then please let us know within a week from today.

High level timeline:

@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active September 28, 2023 14:54
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@brandond
brandond / function.py
Last active February 6, 2023 21:09
Python script to auto-tag AWS EBS Snapshots and Volumes using AMI and Instance tags
import copy
import logging
import os
import boto3
logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO'))
ec2 = boto3.client('ec2')
logger = logging.getLogger(__name__)
@mike-north
mike-north / run phoenix on amazon linux.sh
Last active August 27, 2021 12:17 — forked from eikes/run phoenix on amazon linux.sh
run phoenix on amazon linux
# app deps
sudo yum install git
# erlang deps
sudo yum groupinstall "Development Tools"
sudo yum install ncurses-devel openssl-devel
# erlang
wget http://www.erlang.org/download/otp_src_19.2.tar.gz
tar -zxvf otp_src_19.2.tar.gz
@kwilczynski
kwilczynski / vpn.sh
Last active February 12, 2018 19:54
OpenVPN for TCP and UDP for use with EC2 user data.
#!/bin/bash
set -e
set -u
set -o pipefail
# Return netmask for a given network and CIDR.
cidr_to_netmask() {
value=$(( 0xffffffff ^ ((1 << (32 - $1)) - 1) ))
echo "$(( (value >> 24) & 0xff )).$(( (value >> 16) & 0xff )).$(( (value >> 8) & 0xff )).$(( value & 0xff ))"
@thoolihan
thoolihan / install_tensorflow_centos7.sh
Last active January 28, 2019 06:17
Install TensorFlow on CentOS7
sudo yum -y install epel-release
sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel
# use pip or pip3 as you prefer for python or python3
pip install --upgrade virtualenv
virtualenv --system-site-packages ~/venvs/tensorflow
source ~/venvs/tensorflow/bin/activate
pip install --upgrade numpy scipy wheel cryptography #optional
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp35-cp35m-linux_x86_64.whl
# or below if you want gpu, support, but cuda and cudnn are required, see docs for more install instructions
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0rc0-cp35-cp35m-linux_x86_64.whl
@ctechols
ctechols / compinit.zsh
Last active April 19, 2024 23:44
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@remy
remy / deploy.sh
Created April 2, 2015 16:06
JS Bin's deploy script, run using `deploy jsbin/jsbin` (though the argument should probably just be hard coded since jsbin appears in the source)
#!/bin/bash
readonly ARGS="$@"
readonly DEPLOY_USER="www-data"
clone_repo_at_tag() {
local repo="$1"
local tag="$2"
local project_name="$3"
local repo_dirname="$project_name-$tag"