Skip to content

Instantly share code, notes, and snippets.

@dakira
dakira / PHPUnitTestMethodPlugin.py
Created May 27, 2021 21:58
This plugin allows you to convert a regular sentence to a PHPUnit test method.
# Create a file called PHPUnitTestMethodPlugin.py in Plugins/ within your Sublime Text Packages folder
# You can run this via Sublime's console with: view.run_command("php_unit_test_method")
# You can bind it to ctrl+e as a regular command
import sublime
import re
import sublime_plugin
class PhpUnitTestMethodCommand(sublime_plugin.TextCommand):
def run(self, edit, lines = 10):
@reillysiemens
reillysiemens / signing-vbox-kernel-modules.md
Last active April 8, 2024 12:01
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@adamwathan
adamwathan / 1-add-macros.php
Last active June 11, 2022 19:55
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider