Skip to content

Instantly share code, notes, and snippets.

Avatar

Can Sahin Can-Sahin

  • Dormakaba
  • Zurich, Switzerland
View GitHub Profile
@Can-Sahin
Can-Sahin / download-youtube-interval.sh
Created Dec 2, 2019
Download specific inverval (range) of youtube videos
View download-youtube-interval.sh
ffmpeg -ss 00:00:00 -i $(youtube-dl -f best -g 'YOUTUBE_URL') -t 00:01:00 -c copy DOWNLOAD_NAME.mp4
## prerequisite -> ffmpeg, youtube-dl
## installation commands:
# brew install ffmpeg
# brew install youtube-dl
@Can-Sahin
Can-Sahin / macosx_starter.md
Last active Jul 1, 2019
Personal list of packages and apps that is good be installed or be noted down somewhere
View macosx_starter.md
@Can-Sahin
Can-Sahin / cognito-idtoken-cli.sh
Last active May 26, 2022
Simple shell script to obtain a IdToken from Cognito User Pool. Just like logging in.
View cognito-idtoken-cli.sh
#!/bin/bash
username="COGNITO_USER_NAME"
password="PASSWORD"
clientid="APP_CLIENT_ID"
region="eu-west-1"
aws_profile="AWS_CLI_PROFILE"
response_json=""
json_field='IdToken'
@Can-Sahin
Can-Sahin / deploy-to-s3.md
Last active Apr 12, 2022
Script to deploy static website's build folder to AWS with necessary cache invalidations in S3 and in Cloudfront.
View deploy-to-s3.md

Automated Deployment to AWS S3

A helper script that will deploy build folder to s3 and invalidates caches of service worker, s3 and cloudfront to avoid [not updating problem]

deploy-to-s3.sh:

# Enable printing executed commands
set x
trap "exit" INT