Skip to content

Instantly share code, notes, and snippets.

View metinsenturk's full-sized avatar
🏠
Working from home

Metin Senturk metinsenturk

🏠
Working from home
View GitHub Profile
@metinsenturk
metinsenturk / create_volume_with_folders.sh
Last active December 6, 2025 15:45
Create docker volume with subfolders inside the volume.
# This script has functions to create a Docker volume and manages folders
# within the volume.
# Author: Metin Senturk
# Url: https://gist.github.com/metinsenturk/59eb63aad772390f095d035470d93abb
__create_volume_with_folders() {
local volume_name="$1"
local command="$2"
shift
shift
@metinsenturk
metinsenturk / git-cheat-sheet.sh
Last active December 5, 2018 16:31
Git replacing origin master with local master
#!/bin/bash
# replace origin/master branch with a local branch named as 'otherbranch', with force.
git push origin otherbranch:master -f
# list remote branch
git remote -v
# replace remote branch with another remote branch
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
@metinsenturk
metinsenturk / upload_to_s3.py
Created April 27, 2018 02:47
Upload a File into S3 with Python
import boto3 as boto
# variables
key = 'product.csv'
file_path = 'product.csv'
bucket_name = 'bucket_name'
# init aws
client = boto.client('s3')