Skip to content

Instantly share code, notes, and snippets.

Avatar

Bubba bubba-h57

View GitHub Profile
@bubba-h57
bubba-h57 / .wslconfig
Created Jul 19, 2022
WSLg Configurations for Laravel PHP Development with PHPStorm and Tinkerwell
View .wslconfig
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Specify a custom Linux kernel to use with your installed distros.
# The default kernel used can be found at https://github.com/microsoft/WSL2-Linux-Kernel
# kernel=
# Limits VM memory to use no more than 16 GB, this can be set as whole numbers using GB or MB
memory=16GB
@bubba-h57
bubba-h57 / instructions.md
Created Apr 28, 2022
Configuring Jetbrains Gateway and WSL
View instructions.md

Step 1: SSH Daemon

In your WSL instance, re-install OpenSSH server as follows.

sudo apt remove --purge openssh-server
sudo apt install openssh-server

Edit /etc/ssh/sshd_config (e.g. sudo vi /etc/ssh/sshd_config) and add the following lines to the bottom of the file. Ensure you replace WSL_ACCOUNT_NAME with your WSL2 account name.

@bubba-h57
bubba-h57 / Dockerfile
Created Feb 7, 2022
Modifications to the 8.0 Sail Dockerfile for more functionality as a .devcontainer.
View Dockerfile
FROM ubuntu:21.04
LABEL maintainer="Taylor Otwell"
ARG WWWGROUP
ARG NODE_VERSION=16
WORKDIR /var/www/html
ENV DEBIAN_FRONTEND noninteractive
View .php-cs-fixer.php
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
/* PHP arrays should be declared using the configured syntax. */
'array_syntax' => ['syntax' => 'short'],
/* Binary operators should be surrounded by space as configured. */
@bubba-h57
bubba-h57 / phpunit.yml
Created Apr 29, 2020
Github Actions Continuous Integration/Testing workflow for PHP 7.4, Laravel 7, MariaDb, & Redis.
View phpunit.yml
name: Laravel 7, MariaDb, & Redis CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
continuous-integration:
View keybase.md

Keybase proof

I hereby claim:

  • I am bubba-h57 on github.
  • I am bubba (https://keybase.io/bubba) on keybase.
  • I have a public key ASCdPhM2q9ZHXatdGCzMpylJOredaPtgOItaZ6oKFkT7tQo

To claim this, I am signing this object:

@bubba-h57
bubba-h57 / start.stop.function.js
Last active Sep 26, 2019
So, you want a Google App Script function that will allow you to insert the current date time stamp, but then that date time stamp should not ever change again?
View start.stop.function.js
/**
* This is your `=START()` function.
* It will make a call to the `handleTimestamp_(propertyName)`
* Which does the real work.
*/
function START(){
SpreadsheetApp.getActiveRange().getA1Notation()
return handleTimestamp_('starttimestamep'.concat(SpreadsheetApp.getActiveRange().getA1Notation()))
}
@bubba-h57
bubba-h57 / parallel_stub.php
Created Sep 10, 2019
Stub File for PHP extension parallel
View parallel_stub.php
<?php declare(strict_types=1);
/**
* A helper file for providing autocomplete information for your IDE.
*
* This file should not be included in your code, only analyzed by your IDE!
*
* @author Bubba Hines <bubba@stechstudio.com>
*/
@bubba-h57
bubba-h57 / phpbuild.sh
Created Feb 7, 2019
Build Similar PHP 7.2 & 7.3 Debug/Pthreaded Builds on the same system using phpbrew
View phpbuild.sh
#!/usr/bin/env bash
brew install openssl
brew install gd
brew install imagemagick
brew install libmemcached
brew services start memcached
phpbrew install --name 7.3-debug php-7.3 \
+zts \
+debug \
@bubba-h57
bubba-h57 / LockerRoom.py
Created May 1, 2018
Simple Distributed Advisory Locking Class for AWS Lambda
View LockerRoom.py
import os
import redis
import logging
import string
import random
from collections import namedtuple
from redis.exceptions import RedisError
Lock = namedtuple("Lock", ("valid", "resource", "key", "ttl"))