Skip to content

Instantly share code, notes, and snippets.

View niilante's full-sized avatar
🌊
I'm a builder more than a Mason

Richard Nii Lante Lawson niilante

🌊
I'm a builder more than a Mason
View GitHub Profile
@syofyanzuhad
syofyanzuhad / FormRequest.php
Last active September 12, 2021 20:55 — forked from jamesmills/FormRequest.php
change your default extends FormRequest to your customize FormRequest (API ONLY)
<?php
namespace App\Http\Requests\Api;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Validation\ValidationException;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Foundation\Http\FormRequest as LaravelFormRequest;
@pointybeard
pointybeard / server_build_guide-ubuntu20.04LTS_lnmp_lamp.md
Last active November 12, 2023 20:00
Server Build Guide: Ubuntu (20.04LTS) LNMP/LAMP

Server Build Guide: Ubuntu (20.04LTS) LNMP/LAMP

This is a living document which reflects the current process, accumulated and tuned over many years, that I use to set up a Ubuntu 20.04LTS LNMP/LAMP stack from scratch. It might not suit everyone, and probably isn't without its flaws, but it's a good foundation for any new server setup, one that I use for dev and production servers alike.

If you would like a quick, no-fuss, local LNMP stack, check out my ubuntu_lnmp_docker_vagrant repository.

@th3at0m
th3at0m / kms.md
Last active May 7, 2024 00:02
KMS Keys/Product Keys for Windows/Windows Server

Here, you can find the Product Keys for activating Windows.

Warming: This won't work with Home editions. Please first update to Professional edition if you want to activate Windows.

How do I activate Windows?

  1. Search for "Command Prompt" in the search box
  2. Right Click on the Command Prompt entry
  3. Press "Run as Administrator", then press yes.
  4. Type these commands one by one:
@mikemiller891
mikemiller891 / phpunit.xml
Created October 8, 2020 20:55
A phpunit config for Laravel 8 to generate a code coverage report.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
@niilante
niilante / books.md
Created June 8, 2020 04:32
Direct links to Free Codeship eBooks about Continuous Integration and Delivery, Docker, efficient Software Development, distributed team workflows, and much more.
#!/bin/bash
COUNTER=1
SOURCE="source:/folder"
DESTINATION="destination:/folder"
while [ $COUNTER -lt 100 ]; do
@niilante
niilante / database.rules.json
Created April 22, 2020 22:57 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@rigwild
rigwild / _maintenance_page.html
Created February 18, 2020 21:01
Maintenance page
<!DOCTYPE html>
<html>
<head>
<title>Site is down for maintenance</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body { text-align: center; padding: 10%; font: 20px Helvetica, sans-serif; color: #333; }
h1 { font-size: 50px; margin: 0; }
article { display: block; text-align: left; max-width: 650px; margin: 0 auto; }
@niilante
niilante / Zsh
Created December 28, 2019 01:33 — forked from sarthaksavvy/Zsh
Terminal Alias
export DEFAULT_USER="$(whoami)"
# Alias for composer
alias cr=composer
alias cri="composer install"
alias crd="composer dump-autoload"
alias cru="composer update"
# Alias for artisan commands
alias pa="php artisan"
@Braunson
Braunson / pivot-tables.md
Last active August 13, 2023 19:25
Laravel 8.x - Diving into Pivot Tables

Laravel 6 - Diving Into Pivot Tables

Pivot tables can be confusing and a little hard to wrap your head around at first. In this quick article we are going to dive into what a pivot table is, how to create one and finally how to use the pivot table. Let's dive in!

What is a pivot table?

A pivot table is used to connect relationships between two tables. Laravel provides a Many To Many relationship where you can use a pivot table.