Skip to content

Instantly share code, notes, and snippets.

View hasantayyar's full-sized avatar

Hasan Tayyar Beşik hasantayyar

View GitHub Profile
hasantayyar /
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 /
Created March 10, 2019 20:03
Deploy missing deployment to clusters
if [ -z $SEARCH ]; then
echo "Missing param. 1st param is the search phrase"
exit 1
hasantayyar / phew.png
Last active January 22, 2019 14:08
special char
# 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 /
Created November 19, 2018 10:12 — forked from kn0ll/
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 '^(/.+)', ''
connect_server.use proxy '^/gh(/.+)', ''
hasantayyar / gitlab-logo.png
Last active September 14, 2018 14:18
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 /
Created June 1, 2018 16:17 — forked from magnetikonline/
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.


  • 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;