Skip to content

Instantly share code, notes, and snippets.

View axelitus's full-sized avatar
🎯
Focusing

Axel Pardemann axelitus

🎯
Focusing
View GitHub Profile
@axelitus
axelitus / nord.json
Created September 27, 2022 17:37
Windows Terminal Nord Color Scheme
{
"name": "Nord",
"foreground": "#D8DEE9",
"background": "#2E3440",
"selectionBackground": "#ECEFF4",
"cursorColor": "#D8DEE9",
"black": "#3B4252",
@axelitus
axelitus / port-exclusions
Last active May 30, 2022 22:08
Port exclusions to allow port redirection to WSL2
# Run commands in an elevated prompt
# Stop WinNAT
net stop winnat
# Docker
netsh int ipv4 add excludedportrange protocol=tcp startport=50000 numberofports=50 # Docker - extend range as needed
# Laravel Sail services
netsh int ipv4 add excludedportrange protocol=tcp startport=80 numberofports=1 # Web server
@axelitus
axelitus / build.sh
Created April 24, 2019 13:34
Nord Jetbrains plugin build script
#!/bin/bash
function main() {
echo "Creating plugin package..."
local root=$(clean_folder $(dirname $(realpath "$0")))
local path=$(prepare_package "$root")
local output="$root/nord-jetbrains.jar"
local jar=$(which jar)
if [ ! -z "$jar" ]; then
alias upgrade="time (sudo apt update && sudo apt list --upgradable && echo -n \"Do you want to continue? [y]n: \" && read answer && if [[ -z \"\$answer\" || \"\$answer\" != \"\${answer#[Yy]}\" ]]; then (echo -e \"\e[32mUpdating packages... \e[0m\" && sudo apt full-upgrade -y); else echo -e \"\e[33mThe update has been cancelled. No change has been made. \e[0m\"; fi)"
@axelitus
axelitus / Homestead.yaml
Last active August 3, 2018 15:54
Homestead configuration example using vmware_esxi provider
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: vmware_esxi
esxi_hostname: esxi_hypervisor
esxi_username: homestead
esxi_password: "file:~/.secrets/vmware_esxi.pwd"
esxi_disk_store: storage1
@axelitus
axelitus / homestead.rb
Created August 3, 2018 15:27
Modified homestead script file to include vmware_esxi provider specific configurations
# Main Homestead Class
class Homestead
def self.configure(config, settings)
# Set The VM Provider
ENV['VAGRANT_DEFAULT_PROVIDER'] = settings['provider'] ||= 'virtualbox'
# Configure Local Variable To Access Scripts From Remote Location
script_dir = File.dirname(__FILE__)
# Allow SSH Agent Forward from The Box
@axelitus
axelitus / fonts.conf
Created May 22, 2018 16:04
Font config to fix display of book "Docker for PHP Developers" by Paul Redmond in Linux
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="family" qual="any"><string>ArialMT</string></test>
<edit name="family" mode="assign" binding="same"><string>Arial</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>TimesNewRomanPSMT</string></test>
<edit name="family" mode="assign" binding="same"><string>Times New Roman</string></edit>
@axelitus
axelitus / named-uri-regex
Created August 24, 2012 21:58
Named regex to match and split URI's according to IETF's STD 66
^(?#scheme)(?:(?P<scheme>[A-Za-z][A-Za-z0-9+\-.]*):)?
(?:(?#authority)//
(?#userinfo)(?:(?P<userinfo>.+)@)?
(?#host)(?P<host>(?:(?#named|IPv4)[A-Za-z0-9\-._~%]+|(?#IPv6)\[[A-Fa-f0-9:.]+\]|(?#IPvFuture)\[v[A-Fa-f0-9][A-Za-z0-9\-._~%!$&'()*+,;=:]+\])?)
(?#port)(?::(?P<port>[0-9]+))?
)?
(?#path)(?:/?(?P<path>(?:[A-Za-z0-9\-._~%!$&'()*+,;=@]+/?)*))?
(?#query)(?:\?(?P<query>[A-Za-z0-9\-._~%!$&'()*+,;=:@/?]*))?
(?#fragment)(?:\#(?P<fragment>[A-Za-z0-9\-._~%!$&'()*+,;=:@/?]*))?$
@axelitus
axelitus / gist:2045001
Created March 15, 2012 16:09
[PHP] FuelPHP: New Controller
<?php
/**
* Name
*
* Description
*
* @package Package
* @extends Controller
*/
@axelitus
axelitus / gist:2044966
Created March 15, 2012 16:03
[PHP] General: New file
<?php