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 / 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')