Skip to content

Instantly share code, notes, and snippets.

View phillipsj's full-sized avatar

Jamie Phillips phillipsj

View GitHub Profile
@phillipsj
phillipsj / renew-gpgkey.md
Created February 6, 2023 02:05 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@phillipsj
phillipsj / smtp4dev-manifest.yaml
Created January 31, 2022 03:06
Kubernetes manifest for smtp4dev
apiVersion: v1
kind: Service
metadata:
name: smtp4dev
spec:
selector:
app: smtp4dev
ports:
- name: smtp
protocol: TCP
@phillipsj
phillipsj / pve-templates.sh
Last active April 5, 2024 14:53
Script for creating cloud image templates for Proxmox VE.
#!/usr/bin/env bash
# Creating Tumbleweed Template
wget https://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2
qm create 9000 --name tumbleweed --cores 2 --memory 4096 --net0 virtio,bridge=vmbr0
qm importdisk 9000 openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2 local-lvm
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0
qm set 9000 --boot c --bootdisk virtio0
qm set 9000 --agent 1
qm set 9000 --vga qxl
@phillipsj
phillipsj / random.txt
Created October 12, 2021 19:29
Just a random file for an example.
Just a random file for an example.
@phillipsj
phillipsj / busybox-release.yaml
Created August 26, 2021 16:41
Good test workload
apiVersion: v1
kind: Pod
metadata:
name: hostdir-aksnpwin000002
spec:
containers:
- name: hostdir
image: e2eteam/busybox:1.29
securityContext:
windowsOptions:
@phillipsj
phillipsj / psiex.ps1
Created July 20, 2021 19:33
PowerShell iex param test.
[CmdletBinding()]
param (
[Parameter()]
[Switch]
$Worker,
[Parameter()]
[String]
$Label,
[Parameter()]
[String]
@phillipsj
phillipsj / init.ps1
Last active May 5, 2021 02:08
PowerShell script to use with Docker and custom script extension.
[CmdletBinding()]
param (
[Parameter(Position = 0)]
[String]
$Command
)
Write-Host "It started"
if (Get-Service 'Docker' -ErrorAction SilentlyContinue) {
Write-Host "Checking Docker"
if ((Get-Service Docker).Status -ne 'Running') { Start-Service Docker }
@phillipsj
phillipsj / DotnetGraph.cs
Created February 10, 2021 02:46
Example for doing Graph stuff in .NET Core
using System;
using System.Collections.Generic;
using System.Linq;
namespace Graph {
public class Vertex {
public string Value { get; }
public List<Vertex> AdjacentVertices { get; }
public Vertex(string value) {
sudo apt-get update
sudo apt-get install -y wget curl ca-certificates curl apt-transport-https lsb-release gnupg build-essential git docker.io docker-compose
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
# Add Repos
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
@phillipsj
phillipsj / palindrome.js
Created November 30, 2020 03:09
My version which is faster than the other version. Interesting.
function myIsPalindrome(string){
let reversed = string.split("").reverse().join("");
return string === reversed ? true : false;
}