Skip to content

Instantly share code, notes, and snippets.

@mybigman
mybigman / DockerClient.php
Created October 11, 2021 22:56 — forked from FergusInLondon/DockerClient.php
Example Docker Engine API Client using PHP
<?php
class DockerClient {
/** @param resource */
private $curlClient;
/** @param string */
private $socketPath;
@mybigman
mybigman / octane-on-forge.md
Created September 17, 2021 08:18 — forked from viezel/octane-on-forge.md
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):
@mybigman
mybigman / Dockerfile
Created September 4, 2021 03:58 — forked from andyshinn/Dockerfile
BusyBox cron container example
FROM gliderlabs/alpine:3.3
COPY myawesomescript /bin/myawesomescript
COPY root /var/spool/cron/crontabs/root
RUN chmod +x /bin/myawesomescript
CMD crond -l 2 -f
@mybigman
mybigman / .dockerignore
Created September 3, 2021 01:00 — forked from Baldinof/.dockerignore
Single PHP FPM container with Caddy
/vendor
/docker
/Dockerfile
@mybigman
mybigman / README.md
Created August 31, 2021 07:33 — forked from zoilomora/README.md
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

How to register your global components dynamically in Vue 3?

components/base/index.ts

import { App } from 'vue';

const requireComponent = require.context(
  // The relative path of the components folder
  './',
 // Whether or not to look in subfolders
@mybigman
mybigman / react-forwardref-simple-example.js
Created July 29, 2021 04:16 — forked from jamesreggio/react-forwardref-simple-example.js
Simple example usage of React.forwardRef()
// EmailInput wraps an HTML `input` and adds some app-specific styling.
const EmailInput = React.forwardRef((props, ref) => (
<input ref={ref} {...props} type="email" className="AppEmailInput" />
));
class App extends Component {
emailRef = React.createRef();
render() {
return (
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogTable extends Migration
{
/**
* Run the migrations.
@mybigman
mybigman / weather.lua
Created April 8, 2021 23:49 — forked from meskarune/weather.lua
lua weather script
#!/usr/bin/lua
-- load the http socket module
http = require("socket.http")
-- load the json module
json = require("json")
api_url = "http://api.openweathermap.org/data/2.5/weather?"
-- http://openweathermap.org/help/city_list.txt , http://openweathermap.org/find
cityid = "5128581"
@mybigman
mybigman / README.md
Created April 8, 2021 00:00 — forked from gbrlsnchs/README.md
Void Linux Installation Guide (UEFI + chroot + brtfs + LUKS-encrypted root and swapfile)

Installation guide for Void Linux with LUKS-encrypted btrfs root

Introduction

In this guide you will find:

  • btrfs with Zstandard compression
  • LUKS-encrypted root and swapfile
  • GRUB with UEFI

You will not find:

  • Instructions for file systems other than btrfs