Skip to content

Instantly share code, notes, and snippets.

View phillipsj's full-sized avatar

Jamie Phillips phillipsj

View GitHub Profile
@phillipsj
phillipsj / New-Draft.ps1
Last active January 18, 2017 19:13
Wyam Powershell Post Creations
param(
[string]
$Title,
[string[]]
$Tags
)
$name = $Title -replace "\s+","-"
$name = $name.ToLower()
$invalid = [System.IO.Path]::GetInvalidFileNameChars()
$regex = "[$([Regex]::Escape($invalid))]"
@phillipsj
phillipsj / Program.cs
Created September 11, 2017 01:03
C# Option 1
using System;
namespace option {
class Program {
static void Main(string[] args) {
string message;
var option = GetOption(true);
Console.WriteLine(EvaulateOption(option));
Console.ReadLine();
}
@phillipsj
phillipsj / Program.cs
Created September 12, 2017 17:31
OptionWithMapt
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Security.Cryptography.X509Certificates;
using option;
namespace option {
class Program {
static void Main(string[] args) {
@phillipsj
phillipsj / eks-tools-setup.sh
Created June 7, 2018 01:10
Getting tools for using EKS
## Gets kubectl
echo "Fetching kubectl..."
kubectlUrl="https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -o kubectl "$kubectlUrl"
echo "Making kubectl executable..."
chmod +x ./kubectl
echo "Moving kubectl to /usr/local/bin..."
sudo sudo mv ./kubectl /usr/local/bin/kubectl
## Gets kubectl
echo "Fetching kubectl..."
kubectlUrl="https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -o kubectl "$kubectlUrl"
echo "Making kubectl executable..."
chmod +x ./kubectl
echo "Moving kubectl to /usr/local/bin..."
sudo sudo mv ./kubectl /usr/local/bin/kubectl
@phillipsj
phillipsj / install-openjdk-8.sh
Created June 21, 2018 17:03
Quick little installation script for installing AdoptOpenJDK on Ubuntu 16.04.
wget -q https://github.com/AdoptOpenJDK/openjdk8-releases/releases/download/jdk8u172-b11/OpenJDK8_x64_Linux_jdk8u172-b11.tar.gz
tar -xf OpenJDK8_x64_Linux_jdk8u172-b11.tar.gz
sudo mkdir /usr/lib/jvm && sudo mv jdk8u172-b11 /usr/lib/jvm/jdk8u172-b11
export JAVA_HOME=/usr/lib/jvm/jdk8u172-b11
export PATH=/usr/lib/jvm/jdk8u172-b11/bin
java -version
@phillipsj
phillipsj / packer-installer.sh
Last active December 6, 2018 02:33
Packer installer for Linux
#!/bin/bash
echo "Fetching Packer..."
wget -O packer.zip https://releases.hashicorp.com/packer/1.3.3/packer_1.3.3_linux_amd64.zip
echo "Unzipping Packer..."
unzip packer.zip
echo "Making packer executable..."
chmod +x ./packer
@phillipsj
phillipsj / terraform-installer.sh
Last active December 6, 2018 02:32
Terraform installer for Linux.
#!/bin/bash
echo "Fetching Terraform..."
wget -O terraform.zip https://releases.hashicorp.com/terraform/0.11.10/terraform_0.11.10_linux_amd64.zip
echo "Unzipping Terraform..."
unzip terraform.zip
echo "Making Terraform executable..."
chmod +x ./terraform

Keybase proof

I hereby claim:

  • I am phillipsj on github.
@phillipsj
phillipsj / crystal-setup.sh
Created February 7, 2019 01:36
Bash script for adding Crystal Lang repos to bash and installing it and dependencies.
#! /bin/bash
curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add -
echo "deb [arch=amd64] https://dist.crystal-lang.org/apt crystal main" | sudo tee /etc/apt/sources.list.d/crystal.list
sudo apt-get update
sudo apt install libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev -y
sudo apt install crystal -y