Skip to content

Instantly share code, notes, and snippets.

View letsjustfixit's full-sized avatar
🏗️
Building stuff..

Fixer letsjustfixit

🏗️
Building stuff..
View GitHub Profile
@letsjustfixit
letsjustfixit / email.go
Created November 20, 2020 15:30 — forked from carelvwyk/email.go
Building an email in Golang to be delivered using Amazon SES
func buildEmailInput(source, destination, subject, message string,
csvFile []byte) (*ses.SendRawEmailInput, error) {
buf := new(bytes.Buffer)
writer := multipart.NewWriter(buf)
// email main header:
h := make(textproto.MIMEHeader)
h.Set("From", source)
@letsjustfixit
letsjustfixit / decode_config.bash
Created August 6, 2020 18:07
Decode Docker Config
docker config inspect pxc_proxysql_cnf | jq '.[0].Spec.Data' -r | base64 --decode > proxysql.cfg
@letsjustfixit
letsjustfixit / force_remove_consul_containers.bash
Created February 9, 2020 21:23
Force purge removed consul containers one liner
consul members | grep left | cut -d ' ' -f 1 | xargs -I{} echo "consul force-leave -prune {}"
version: "2"
services:
node1:
container_name: node1
image: percona/percona-xtradb-cluster:5.7
environment:
- CLUSTER_NAME=cluster1
- MYSQL_ROOT_PASSWORD=root
networks:
- pxc-network
@letsjustfixit
letsjustfixit / MagicSquare.cs
Created October 30, 2019 00:31
Clipped MagicSquare.cs
using System;
namespace ConsoleApp1
{
class Program
{
//rows contains the row sums, cols contains the col sums
static void sumsGeneration(int[,] m, int[] rows,int[] cols)
{
for(int i=0; i < rows.Length; i++)
@letsjustfixit
letsjustfixit / composer_update.log
Created July 23, 2019 11:29
lumen composer upgrade log 5.7 -> 5.8
- Removing symfony/contracts (v1.0.2)
- Updating ralouphie/getallheaders (2.0.5 => 3.0.3): Downloading (100%)
- Updating guzzlehttp/psr7 (1.5.2 => 1.6.1): Downloading (100%)
- Updating phpseclib/phpseclib (2.0.14 => 2.0.21): Downloading (100%)
- Updating google/apiclient-services (v0.82 => v0.104): Downloading (100%)
- Updating google/auth (v1.4.0 => v1.5.1): Downloading (100%)
- Updating google/apiclient (v2.2.2 => v2.2.3): Downloading (100%)
- Updating symfony/polyfill-ctype (v1.10.0 => v1.11.0): Loading from cache
- Installing phpoption/phpoption (1.5.0): Downloading (100%)
- Updating vlucas/phpdotenv (v2.6.1 => v3.4.0): Downloading (100%)
@letsjustfixit
letsjustfixit / cmdline.txt
Created July 22, 2019 08:09
Raspberry Pi (4) mouse lag
Extend with this:
usbhid.mousepoll=0
@letsjustfixit
letsjustfixit / symlinks.bash
Created July 22, 2019 08:08
Vmware Horizon View client pcoip
#!/bin/bash
#ˇNope that wont workˇ
#newfile="~/uptime"
newfile=~/uptime
date >> $newfile
uptime >>$newfile
echo "----------------" >>$newfile
echo " " >>$newfile