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 / .docker-config.json
Last active September 9, 2017 16:07
Nexus: using local registries for common services
{
"auths": {
"https://index.docker.io/v1/": {},
"localhost:8083": {}
},
"credsStore": "osxkeychain"
}
@ksatirli
ksatirli / docker-cleanup-volumes.sh
Created September 18, 2017 10:59
Docker: clean up (dangling) volumes
#!/bin/sh
docker volume ls -qf dangling=true | xargs -r docker volume rm