Skip to content

Instantly share code, notes, and snippets.

View litan1106's full-sized avatar

Li Tan litan1106

View GitHub Profile
@asheroto
asheroto / Remove-Duplicate-Entries-From-Path-Variables.ps1
Last active June 26, 2024 13:36
PowerShell script to remove duplicate entries from PATH environmental variables in Windows.
Clear-Host;
# Begin
Write-Output "⏲️⏲️⏲️ Starting ⏲️⏲️⏲️"
Write-Output ("-" * 50)
Write-Output ""
# System PATH
Write-Output "🖥️ Checking System PATH 🖥️"
$TempMachinePath = [System.Environment]::GetEnvironmentVariable("Path", "Machine");
@viezel
viezel / octane-on-forge.md
Last active December 16, 2023 21:57
Quickly get Octane running on Laravel Forge

Quickly get Octane running on Laravel Forge

  1. Spin up a new App server, choose PHP 8
  2. SSH into it and run sudo -i to become root
  3. Run pecl install swoole and enable what you need. (I disabled curl as it did not work for me)
  4. Add a new Site to your server and use git to pull in your Laravel project that has Octane installed.
  5. Point your DNS to your new site
  6. Enable SSL using Lets Encrypt
  7. Change your new Sites Nginx settings to (assuing your site is named octane.example.com):
@lizrice
lizrice / Vagrantfile
Last active February 3, 2023 02:21
Vagrant file for setting up a single-node Kubernetes cluster that I can access from my desktop. Read more: https://medium.com/@lizrice/kubernetes-in-vagrant-with-kubeadm-21979ded6c63
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This script to install Kubernetes will get executed after we have provisioned the box
$script = <<-SCRIPT
# Install kubernetes
apt-get update && apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
@alanstevens
alanstevens / Windows11_Setup.md
Last active June 22, 2024 02:16
Windows 11 Setup

This guide was created using Microsoft Windows 11 Pro

Version 21H2 build 22000.194

Installation

System Updates:

  • Settings -> Windows Update
  • Install all updates

Powershell Execution Policy:

  • launch Windows Powershell as administrator and execute: