Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Hasan Tayyar Beşik hasantayyar

I may be slow to respond.
View GitHub Profile
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 Mar 10, 2019
Deploy missing deployment to clusters
if [ -z $SEARCH ]; then
echo "Missing param. 1st param is the search phrase"
exit 1
# 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 Nov 19, 2018 — 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 / graph.js
Last active Feb 16, 2021
extracte the state machien svg graph library from aws bundle
View graph.js
/*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 Jun 1, 2018 — 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.
View nginx-proxy-private-allow-certbot.conf
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;