Skip to content

Instantly share code, notes, and snippets.

View ShawnCrigger-SOLS's full-sized avatar

Shawn Crigger ShawnCrigger-SOLS

  • SiteOne Landscape Supply
  • Myrtle Beach, SC
View GitHub Profile
@ShawnCrigger-SOLS
ShawnCrigger-SOLS / README.md
Last active August 15, 2021 20:03 — forked from djfdyuruiry/README.md
WSL 2 - Enabling systemd

Enable systemd in WSL 2

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

    cd /tmp
@ShawnCrigger-SOLS
ShawnCrigger-SOLS / install-exts.sh
Created June 9, 2022 15:51
Visual Studio Code Extensions I use installer script
#!/bin/bash
## A lot of these extensions came in packs and probably are not used activly but these are what i have installed.
## The below command will give you a list of all the extensions with the CLI command to install them.
## code --list-extensions | xargs -L 1 echo code --install-extension
code --install-extension abusaidm.html-snippets
code --install-extension adrianwilczynski.format-selection-as-html
code --install-extension AESSoft.aessoft-class-autocomplete
code --install-extension af4jm.vscode-icalendar
code --install-extension agutierrezr.emmet-keybindings
@ShawnCrigger-SOLS
ShawnCrigger-SOLS / .editorconfig
Last active July 6, 2022 13:26
Pimcore editor config file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
[*.php]
insert_final_newline = true
trim_trailing_whitespace = true
@ShawnCrigger-SOLS
ShawnCrigger-SOLS / .aliases
Last active July 5, 2022 14:57
Since WSL does not have systemctl, this is a hacky way to start all the services you need to start every time you reboot your WSL or Laptop
# Current Version: 1.3
# Starts all the services that normally startup with systemd but that does not work with WSL so
# until there is a real fix I wrote this shell script to really fash start all the services needed.
# By: Shawn Crigger
# Website: http://blog.shawn-crigger.com/
# Now this is just a simple alias, I store all my ZSH|BASH aliases in a seoerate file called .aliases
# Just whereever you store your aliases just add the following if you want it.Just add the following line and resource the file your aliases are stored in
@ShawnCrigger-SOLS
ShawnCrigger-SOLS / PhpArrayToYaml.php
Created November 19, 2022 00:23 — forked from ArnaudLigny/PhpArrayToYaml.php
Convert PHP array to YAML
#!/usr/local/bin/php
<?php
if (php_sapi_name() !== 'cli') {
return;
}
date_default_timezone_set('Europe/Paris');
require_once 'vendor/autoload.php';
use Symfony\Component\Yaml\Yaml;
try {