Skip to content

Instantly share code, notes, and snippets.

@spham
spham / main.tf
Created November 16, 2023 23:38 — forked from hongkongkiwi/main.tf
Initialises Terraform HTTP backend to Gitlab. Here's a nice script which will ask for details in an interactive way.
# More information can be found at https://docs.gitlab.com/ee/user/infrastructure/#gitlab-managed-terraform-state
terraform {
backend "http" {
}
}
@spham
spham / docker-aliases.sh
Created May 31, 2023 08:34 — forked from jgrodziski/docker-aliases.sh
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@spham
spham / letsencrypt-certbot-arangodb.md
Created May 18, 2023 06:15 — forked from RienNeVaPlus/letsencrypt-certbot-arangodb.md
Using Let's Encrypt's Certbot SSL-Certificates with ArangoDB

Using Let's Encrypt's Certbot Certificates with ArangoDB

Let's Encrypt generates SSL certificates for free.
Follow these steps to create and use an SSL certificate with ArangoDB.

1. Install the Certbot from LetsEncrypt (Certbot instructions)

sudo apt-get update
sudo apt-get install software-properties-common
@spham
spham / Multiform.php
Created December 27, 2021 12:51 — forked from webdevmatics/Multiform.php
Livewire multiform #livewire
<?php
namespace App\Http\Livewire;
use App\Customer;
use Livewire\Component;
class Multiform extends Component
{
public $name;

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
@spham
spham / Kernel.php
Created February 26, 2021 09:25 — forked from phillipsharring/Kernel.php
Laravel Artisan command to perform MySQL Dump using database connection information in the .env file. Forked from https://gist.github.com/kkiernan/bdd0954d0149b89c372a
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@spham
spham / Laravel 6.x Github Action with SQLite
Created May 10, 2020 18:50 — forked from djaiss/Laravel 6.x Github Action with SQLite
Working example on how to use SQLite with a Laravel 6.x installation.
name: Unit tests
on: [push]
jobs:
phpunit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy .env
@spham
spham / guitar-tuner.js
Created June 27, 2019 03:21 — forked from muttoni/guitar-tuner.js
The lambda code to the Guitar Tuner skill we are building
/* This code has been generated from your interaction model
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
// There are three sections, Text Strings, Skill Code, and Helper Function(s).
// You can copy and paste the contents as the code for a new Lambda function, using the alexa-skill-kit-sdk-factskill template.
// This code includes helper functions for compatibility with versions of the SDK prior to 1.0.9, which includes the dialog directives.
@spham
spham / api_cache.php
Created June 6, 2019 03:35 — forked from corbanb/api_cache.php
Simple API caching with PHP
<?php
/**
* API Request Caching
*
* Use server-side caching to store API request's as JSON at a set
* interval, rather than each pageload.
*
* @arg Argument description and usage info
*/
######################
# Create The Cluster #
######################
# Make sure that your minishift version is v1.15 or higher
minishift start \
--vm-driver virtualbox \
--cpus 2 \
--memory 2048 \