Skip to content

Instantly share code, notes, and snippets.

import json
import tempfile
from datetime import datetime
import os
import random
import sys
from botocore.exceptions import ClientError
import boto3
import dns.resolver
@nwestfall
nwestfall / function.js
Last active March 23, 2020 17:22
City Church - Texting Lambda Function
const url = require('url')
exports.handler = async (event) => {
console.log(event)
let buffer = Buffer.from(event.body, 'base64')
var text = buffer.toString('ascii')
@nwestfall
nwestfall / NugetPackageConverter
Created August 29, 2018 17:40
Converts a packages.config file to the new <ItemGroup><PackageReference> format for you to paste in your .csproj
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using System.Collections.Generic;
namespace NugetPackageConverter
{
class Program
{
@nwestfall
nwestfall / AutoResizeTextView.cs
Created June 5, 2017 17:11
AutoResize Text in TextView for Xamarin.Android
/**
* DO WHAT YOU WANT TO PUBLIC LICENSE
* Version 1, December 2017
*
* Copyright (C) 2017 Nathan Westfall
*
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
@nwestfall
nwestfall / socket.rb
Created May 18, 2017 14:28
Ruby Socket Client Console Tester
require 'socket'
class App
def self.send(ip, port, file, delay)
puts "Starting up Socket Client on #{ip}:#{port} with a delay of #{delay} seconds"
file_content = File.read(file)
puts "File read"
while true
begin
socket = TCPSocket.open(ip, port)