Skip to content

Instantly share code, notes, and snippets.

View hasantayyar's full-sized avatar
⌨️
AFK

Hasan Tayyar Beşik hasantayyar

⌨️
AFK
View GitHub Profile
@hasantayyar
hasantayyar / terraform-aliases.sh
Created May 19, 2020 08:48
terraform aliases
alias t="terraform"
alias tplanshort="terraform plan -no-color | grep -E '^[[:punct:]]|Plan'"
alias tplanless="terraform plan -no-color | grep -E '(^.*[#~+-] .*|^[[:punct:]]|Plan)'"
@hasantayyar
hasantayyar / search-and-deploy.sh
Created March 10, 2019 20:03
Deploy missing deployment to clusters
PROJECT="your-project-name"
SEARCH=$1
FILE=$2
CLUSTER_FILTER=$3
if [ -z $SEARCH ]; then
echo "Missing param. 1st param is the search phrase"
exit 1
fi
@hasantayyar
hasantayyar / phew.png
Last active January 22, 2019 14:08
special char
phew.png
# list code lines
find . -type f -name "*.ts" -exec cat {} + | sort -u
# count them
find . -type f -name "*.ts" -exec cat {} + | sort -u | wc -l
@hasantayyar
hasantayyar / proxy.coffee
Created November 19, 2018 10:12 — forked from kn0ll/proxy.coffee
a simple nodejs request proxy as connect middleware. developed as a cross domain ajax proxy.
###
a small connect middleware proxy for cross domain ajax
@path first match group will be forwarded
@host the host you want to proxy
connect_server.use proxy '^(/.+)', 'api.twitter.com'
connect_server.use proxy '^/gh(/.+)', 'api.github.com'
###
@hasantayyar
hasantayyar / gitlab-logo.png
Last active September 14, 2018 14:18
gitlab
gitlab-logo.png
@hasantayyar
hasantayyar / graph.js
Last active February 16, 2021 02:24
extracte the state machien svg graph library from aws bundle
/*global dagreD3*/
/*global d3*/
/*global WheelEvent*/
/*global window */
(function () {
"use strict";
var module = angular.module("WorkflowGraph", []);
function intersectRect(node, point) {

I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.

UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.

This works for me with CircleCI and EB Cli.

{
    "Version": "2012-10-17",
    "Statement": [
        {
@hasantayyar
hasantayyar / README.md
Created June 1, 2018 16:17 — forked from magnetikonline/README.md
AWS Elastic Beanstalk deploy user restricted IAM policy.

AWS Elastic Beanstalk deploy user restricted IAM policy

An IAM user policy document to give minimal rights for deploying an Elastic Beanstalk application.

Where:

  • REGION: AWS region.
  • ACCOUNT_ID: AWS account ID.
  • APPLICATION_NAME: Desired target Elastic Beanstalk application name(space).
  • IAM_INSTANCE_PROFILE_ROLE: The instance profile (IAM role) Elastic Beanstalk EC2 instaces will run under.
server {
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/letsencrypt;
allow all;
}
index index.html index.htm index.nginx-debian.html;
server_name xxxx.com www.xxxx.com;