Skip to content

Instantly share code, notes, and snippets.

View JakeTheCorn's full-sized avatar

Jake Corn JakeTheCorn

  • Indianapolis, IN
View GitHub Profile
@tetsupanda
tetsupanda / setAwsCreds.js
Last active August 25, 2020 14:51
Node script that updates the credentials file, in the case you are using the AWS SDK and AWS CLI behind AWS SSO.
//Using encode, parse from 'ini' lib, probably not needed *shrugs*
async function setAWSCredentials () {
const userProfilePath = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME']
const awsCacheFile = '/.aws/cli/cache'
const awsCredentialFile = '/.aws/credentials'
const cachefullPath = userProfilePath + awsCacheFile
const credsFullPath = userProfilePath + awsCredentialFile
@danihodovic
danihodovic / main.tf
Created January 8, 2017 20:48
Terraform - static site using S3, Cloudfront and Route53
variable "aws_region" {
default = "eu-west-1"
}
variable "domain" {
default = "my_domain"
}
provider "aws" {
region = "${var.aws_region}"
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n