Skip to content

Instantly share code, notes, and snippets.

View bcambel's full-sized avatar
🌴
On vacation

Bahadir Cambel bcambel

🌴
On vacation
View GitHub Profile
@bcambel
bcambel / app.py
Created July 23, 2023 21:28 — forked from btotharye/app.py
AWS CDK ECS Fargate with ALB and VPC Flow Logs Including Cloudwatch logs for ECS - Locked down to custom peer IP
from aws_cdk import (
aws_ec2 as ec2,
aws_ecs as ecs,
aws_iam as iam,
aws_logs as logs,
aws_elasticloadbalancingv2 as elbv2,
core,
)
@bcambel
bcambel / jq-cheetsheet.md
Created May 19, 2023 11:46 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@bcambel
bcambel / twittermute.txt
Created January 25, 2020 00:16 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link below in the summary jumps at the answer on this page.
  • The link on the question itself points back at the original post.

Summary

@bcambel
bcambel / ec2-spot-ecs-drainer.png
Created October 28, 2018 07:04 — forked from fredsig/ec2-spot-ecs-drainer.png
Lambda function that drains tasks from an ECS instance. To be triggered by EC2 Spot Instance Interruption Warning.
ec2-spot-ecs-drainer.png
@bcambel
bcambel / cuda_installation_on_ubuntu_18.04
Created October 15, 2018 11:59 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
cuda 9.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@bcambel
bcambel / DynamicPublicVPC.py
Created September 28, 2018 12:37 — forked from Packet-Lost/DynamicPublicVPC.py
Troposphere / boto3 dynamic vpc cloudformation template creation
import boto3
import time
import os
from troposphere import Base64, FindInMap, GetAtt, Join, Output
from troposphere import Parameter, Ref, Tags, Template
from troposphere.ec2 import PortRange, NetworkAcl, Route, \
SubnetRouteTableAssociation, Subnet, RouteTable, \
VPCGatewayAttachment, VPC, NetworkInterfaceProperty, NetworkAclEntry, \
SubnetNetworkAclAssociation, EIP, Instance, InternetGateway
{"TranscodeWavToMp3": {
"Type": "Task",
"Resource": "arn:aws:lambda:eu-west-1:XXX:function:transcode_audio_using_aws_etranscoder",
"Retry": [
{
"ErrorEquals": [
"States.ALL"
],
"IntervalSeconds": 1,
"MaxAttempts": 3,
@bcambel
bcambel / input.json
Created August 23, 2018 11:14
Step Functions Workflow
{
"config": {
"audio-wf-arn": "arn:aws:states:eu-west-1:XXXX:stateMachine:AudioWorkflow",
"transcription-service": "https://NNNNN.execute-api.eu-west-1.amazonaws.com/dev/transcribe",
"transcription-service-poll": "https://NNNNN.execute-api.eu-west-1.amazonaws.com/dev/transcribe/status",
"transcription-service-poll-stepfn": "arn:aws:states:eu-west-1:XXXX:stateMachine:PollTranslation",
"audio-service": "http://172.31.110.201",
"tagger-service": "http://172.31.103.39/predict",
"datadog-api": {
"api_key": "",