Skip to content

Instantly share code, notes, and snippets.

View georgemck's full-sized avatar
😀

GeorgeMcK georgemck

😀
View GitHub Profile
@georgemck
georgemck / get_into_docker_image.md
Created May 22, 2025 12:23 — forked from joseluisq/get_into_docker_image.md
How do you get into a Docker image?

How do you get into a Docker image?

We can do this running our image interactively which creates a temporary container for:

docker run --rm -it \
    --name my_container \
    --volume $PWD:/some_dir_in_container \
    --workdir /some_dir_in_container \
 golang:1.13-buster bash
@rschuetzler
rschuetzler / 00_get_certificate.sh
Last active November 4, 2025 17:01
Using LetsEncrypt with Amazon Linux 2023
#!/usr/bin/env bash
# Place in .platform/hooks/postdeploy directory
sudo certbot -n -d YOURDOMAINHERE --nginx --agree-tos --email YOUREMAILHERE
@georgemck
georgemck / lambda-pinpoint.js
Created May 6, 2022 17:42 — forked from netroy/lambda-pinpoint.js
Use A Lambda function to send an SMS over Amazon Pinpoint
const appId = [[PINPOINT_APPLICATION_ID]];
const destination = [[YOUR_PHONE_NUMBER]];
const { Pinpoint } = require('aws-sdk');
const pinpoint = new Pinpoint();
const payloadFn = (appId, destination, message) => {
const ApplicationId = appId;
const Addresses = {};
@anwarulislam
anwarulislam / env-to-json.js
Last active May 28, 2025 05:29
ENV format to JSON object converter node script - node env-to-json ./file.env
const fs = require("fs");
var fileName = process.argv.slice(2)[0];
console.log(fileName);
fs.readFile(fileName, "utf8", function (err, data) {
if (err) {
return console.log(err);
}
@bikcrum
bikcrum / Connect Google Colab+Drive with SSH.ipynb
Last active October 16, 2024 03:23
This is the way how can you connect google colab as well as google drive (mounted) using SSH. This is useful when you want to download data directly to your google drive specially for machine learning purpose. It can be easy to mount google drive and use files into for your code.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joseluisq
joseluisq / get_into_docker_image.md
Last active May 22, 2025 12:23
How do you get into a Docker image?

How do you get into a Docker image?

We can do this running our image interactively which creates a temporary container for:

docker run --rm -it \
    --name my_container \
    --volume $PWD:/some_dir_in_container \
    --workdir /some_dir_in_container \
 golang:1.13-buster bash
@LukeMwila
LukeMwila / auth.ts
Created August 25, 2019 17:25
Helper functions for sign up and sign in logic with AWS Cognito
import * as React from "react";
import {
AuthenticationDetails,
CognitoUserPool,
CognitoUserAttribute,
CognitoUser,
CognitoUserSession,
} from "amazon-cognito-identity-js";
import moment from "moment";
/** Utils */
@TheNetJedi
TheNetJedi / ExportLambdaFunctions.sh
Last active December 24, 2024 17:44
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
@SamDecrock
SamDecrock / echobuttons1.js
Last active July 26, 2022 20:05
Connecting to an Amazon Echo Button
var btSerial = new (require('bluetooth-serial-port')).BluetoothSerialPort();
var address = '50-dc-e7-a3-0b-e8';
btSerial.findSerialPortChannel(address, function(channel) {
btSerial.connect(address, channel, function() {
console.log('> connected to ' + address);
btSerial.on('data', function(buffer) {
console.log('> receiving ('+buffer.length+' bytes):', buffer);