Skip to content

Instantly share code, notes, and snippets.

View jewelsjacobs's full-sized avatar
:octocat:
Working

Julia Jacobs jewelsjacobs

:octocat:
Working
View GitHub Profile
@jewelsjacobs
jewelsjacobs / README.md
Created July 24, 2023 21:22
Load Console Data README
@jewelsjacobs
jewelsjacobs / app.py
Created July 24, 2023 21:21
LoadConsoleData Python Lambda App
import os
import boto3
import coto
from botocore.exceptions import ClientError
import logging
from pythonjsonlogger import jsonlogger
from datetime import datetime
import json
@jewelsjacobs
jewelsjacobs / getPermutations.js
Created July 6, 2022 10:14
Get Permutations Algo Recursion - I don't get it help
// Without Repetitions
function getPermutations(options) {
const permutations = []
console.log("FN START")
console.log(options)
if (options.length === 1) {
return [options] // return statement doesn't seem to break out of function why?
}
@jewelsjacobs
jewelsjacobs / gcloudscp.sh
Last active April 11, 2022 20:42
[gcloud scp] #gcp #scp #gcloud
gcloud compute scp ~/Desktop/samples.zip --zone "us-central1-a" fugue-automation:~/samples.zip --project "it-cloud-automation-dev-gcp"
@jewelsjacobs
jewelsjacobs / convertmovtogif.sh
Created April 11, 2022 18:01
[Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal] #mov #gif #bash #shell
# https://gist.github.com/SheldonWangRJT/8d3f44a35c8d1386a396b9b49b43c385
# https://www.youtube.com/watch?v=QKtRMFvvDL0
# $brew install ffmpeg
# $brew install gifsicle
# 1. Convert the file to gif using ffmpeg
# - input path argument `-i`
# - pixel format argument `-pix_fmt`
# - removing some frames using framerate argument `-r`
# - end `ffmpeg` with new path/to/filename
@jewelsjacobs
jewelsjacobs / copy-from-gcp.sh
Created April 5, 2022 19:18
[Copy file to macOS clipboard from GCP vm] #gcp #vm #gcloud
gcloud compute ssh --zone [zone] --project [project] [vm-name] --command "cat [file]" | pbcopy
@jewelsjacobs
jewelsjacobs / aws-shorts.plugin.zsh
Created October 11, 2021 15:28
[oh-my-zsh AWS Shorts Custom Plugin] #aws #oh-my-zsh
#!/usr/bin/env zsh
## CloudFormation related
## Install:
## 1. Create folder in $HOME/.oh-my-zsh/custom/plugins aws-shorts
## 2. Put this file aws-shorts.plugin.zsh in.
## 3. Add aws-shorts to plugins on $HOME/.zshrc and source $HOME/.zshrc
function cfnstacks() {
aws cloudformation describe-stacks --query 'Stacks[*].[StackName,StackStatus]' --output table
}
@jewelsjacobs
jewelsjacobs / layers.sh
Last active May 20, 2020 23:35
Create python layer
LIB_DIR=aioboto3-layer/python
mkdir -p $LIB_DIR
pip install aioboto3 -t $LIB_DIR
cd aioboto3-layer
zip -r ~/Desktop/aioboto3-layer.zip .
# Upload or
aws lambda publish-layer-version --layer-name aioboto3-layer --zip-file fileb:///$HOME/Desktop/aioboto3-layer.zip