Skip to content

Instantly share code, notes, and snippets.

View skowronek's full-sized avatar

Skowronek skowronek

  • South Jordan, Utah
  • 01:51 (UTC -07:00)
View GitHub Profile
@skowronek
skowronek / ExportLambdaFunctions.sh
Created November 13, 2021 18:52 — forked from TheNetJedi/ExportLambdaFunctions.sh
Bash script to download all your Lambda functions.
#!/usr/bin/env bash
#You need to have aws-cli installed and configured
#Credits to Reddit user u/aa93 for the suggestions
mkdir code
aws lambda list-functions | \
grep FunctionName | \
cut -d '"' -f4 | \
while read -r name; do
aws lambda get-function --function-name $name | tail -n 3 | egrep -o 'https?://[^ ]+' | sed 's/"//' | xargs wget -O ./code/$name.zip
@skowronek
skowronek / index.js
Created November 4, 2021 18:52 — forked from ppaquette/index.js
Lambda to export twilio recordings to S3
'use strict';
const axios = require('axios');
const AWS = require('aws-sdk');
const S3UploadStream = require('s3-upload-stream');
const Twilio = require('twilio');
const ACCOUNT_SID = "AC2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const AUTH_TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const S3_BUCKET = "BUCKET-NAME";
const S3_PREFIX = "Recordings";
@skowronek
skowronek / DateTime
Created January 29, 2021 23:55 — forked from pbaruns/DateTime
Insert Date Time
/**
* The onOpen function runs automatically when the Google Docs document is
* opened. Use it to add custom menus to Google Docs that allow the user to run
* custom scripts. For more information, please consult the following two
* resources.
*
* Extending Google Docs developer guide:
* https://developers.google.com/apps-script/guides/docs
*
* Document service reference documentation:
@skowronek
skowronek / makecab.ps1
Created January 21, 2020 21:46 — forked from rheid/makecab.ps1
Creating .CAB files with Powershell
<#
.SYNOPSIS
Creates a new cabinet .CAB file on disk.
.DESCRIPTION
This cmdlet creates a new cabinet .CAB file using MAKECAB.EXE and adds
all the files specified to the cabinet file itself.
.PARAMETER Name
The output file name of the cabinet .CAB file, such as MyNewCabinet.cab.
@skowronek
skowronek / photo-utils.ps1
Created August 31, 2019 22:38 — forked from stuartleeks/photo-utils.ps1
photo-utils.ps1
[reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Drawing.dll")
function BytesToString($bytes) {
return [System.Text.Encoding]::ASCII.GetString($bytes)
}
function StringToBytes($string) {
return [System.Text.Encoding]::ASCII.GetBytes($string)
}
function GetImageTakenDate($filename) {
@skowronek
skowronek / gw-gravity-forms-change-field-id.js
Last active October 23, 2018 18:52 — forked from spivurno/gw-gravity-forms-change-field-id.js
Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
/**
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
*
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/changing-your-gravity-forms-field-ids/
* @video http://www.screencast.com/t/STm1eLZEsR9q