Skip to content

Instantly share code, notes, and snippets.

View ksatirli's full-sized avatar

Kerim Satirli ksatirli

View GitHub Profile
@ksatirli
ksatirli / keybase.md
Created July 17, 2015 11:49
keybase.md

Keybase proof

I hereby claim:

  • I am ksatirli on github.
  • I am ksatirli (https://keybase.io/ksatirli) on keybase.
  • I have a public key whose fingerprint is 38F5 4ADD 621D 40EB 4E8F BBB2 599E 7F95 94DF 9E1F

To claim this, I am signing this object:

@ksatirli
ksatirli / get-instance-screenshot.sh
Created August 15, 2017 07:19
AWS: get EC2 Instance screenshot
#!/bin/bash
aws \
--profile="withmethod" \
--region="eu-west-1" \
ec2 \
get-console-screenshot \
--instance-id "i-01a2bc34d5d67e89f" \
| jq \
--raw-output \
#!/bin/bash
aws \
ec2 describe-images \
--owner "self" \
--filter "Name=root-device-type,Values=ebs" \
--filter "Name=hypervisor,Values=xen" \
--filter "Name=state,Values=available" \
--filter "Name=architecture,Values=x86_64" \
--filter "Name=public,Values=true" \
@ksatirli
ksatirli / get-browser-versions.bat
Created August 16, 2017 11:04
get Windows Browser versions
@echo off
:: BEGIN: ensure all variables stay local:
setlocal
:: BEGIN: define config variables:
set versions_file="versions.txt"
:: END: define config variables:
@ksatirli
ksatirli / docker-compose.yml
Created August 29, 2017 12:35
data-only-container-in-docker-compose.yml
---
version: '2'
services:
shared:
image: busybox
container_name: shared
volumes:
- /tmp:/shared
@ksatirli
ksatirli / ansible-add-user-on-local-system.yml
Created September 9, 2017 16:03
Ansible: add user on local system
---
-
name: add user on local system
hosts: localhost
strategy: free
gather_facts: false
tasks:
- name: add user
@ksatirli
ksatirli / ansible-aws-ec2-toggle-api-termination-protection.yml
Created September 9, 2017 16:04
Toggle EC2 Instance Termination Protection
---
- name: Toggle EC2 Instance Termination Protection
hosts: all
connection: local
gather_facts: false
pre_tasks:
- name:
fail:
@ksatirli
ksatirli / ansible-start-docker-container.yml
Created September 9, 2017 16:05
Ansible: start Docker Container
---
-
name: interacting with Docker
hosts: localhost
strategy: free
gather_facts: true
vars:
docker_host_registry_path: "/Users/{{ lookup('env','USER') }}/Sites/_test.local/docker-registry"
@ksatirli
ksatirli / aws-route53-update-contact-details.sh
Created September 9, 2017 16:05
AWS: Route 53 Update Contact Details
#!/bin/bash
DOMAINS=(example.com example.net)
CONTACT="FirstName=Clifford,LastName=Smith,ContactType=COMPANY,OrganizationName=Method,AddressLine1=Sample Lane 123,City=Amsterdam,CountryCode=NL,ZipCode=1234 AB,PhoneNumber=+31.123456789,[email protected]"
for DOMAIN in "${DOMAINS[@]}"
do
echo "going to update domain ${DOMAIN}"
aws \
@ksatirli
ksatirli / start-portainer.sh
Created September 9, 2017 16:05
Portainer: start
#!/bin/bash
docker \
run \
--name portainer \
--privileged \
--detach \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/Sites/docker-data/portainer/:/data \