Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Metin Senturk metinsenturk

🏠
Working from home
View GitHub Profile
@metinsenturk
metinsenturk / git-cheat-sheet.sh
Last active Dec 5, 2018
Git replacing origin master with local master
View git-cheat-sheet.sh
#!/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 Apr 27, 2018
Upload a File into S3 with Python
View upload_to_s3.py
import boto3 as boto
# variables
key = 'product.csv'
file_path = 'product.csv'
bucket_name = 'bucket_name'
# init aws
client = boto.client('s3')