Skip to content

Instantly share code, notes, and snippets.

View daugaard47's full-sized avatar

Chris daugaard47

View GitHub Profile
@AlexVanderbist
AlexVanderbist / opendb-ddev.sh
Created September 17, 2020 16:39
opendb for ddev
opendb () {
unset GREP_OPTIONS
PORT="$(ddev describe | ggrep -Pio "(?<=port=)[0-9]*")"
open mysql://db:[email protected]:${PORT}/db
}
@ryanmortier
ryanmortier / wsl_development_environment.md
Last active July 13, 2022 11:10
WSL Development Environment

WSL Development Environment

Windows

Source: https://docs.microsoft.com/en-us/windows/wsl/install-win10

  1. Elevated PowerShell: wsl --install
  2. Reboot computer when prompted.
  3. Setup will continue automatically and install Ubuntu.
  4. Setup a user and password for Ubuntu when prompted.
  5. Install Microsoft Terminal, configure fonts and theme.
  6. Install Visual Studio Code, configure settings, keybinds, theme, and extensions.
@ajay-ag
ajay-ag / Laravel And Alpine Pagination
Last active September 17, 2023 16:24
Laravel And Alpinej.js Pagination Component ,Alpine js
<div class="container-fluid">
<div class="row">
<!-- /.col-md-6 -->
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<div class="row" id="laravelPagination" data-url="{{ route('country.page') }}" x-data="laravelPagination()"
x-init="init()">
<template x-for="item in country" :key="item.id">
<div class="card col-12 mb-3">
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active November 10, 2024 11:16
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@teoyoung
teoyoung / must-see
Last active September 30, 2024 09:00
WebGl courses + tutorials
---------------------------------------
1. Great GLSL course
https://thebookofshaders.com/
https://thebookofshaders.com/?lan=ru (russian language)
2. WebGl basics
https://webglfundamentals.org
https://webglfundamentals.org/webgl/lessons/ru (russian language)
@daugaard47
daugaard47 / 01_Laravel 5 Simple ACL manager_Readme.md
Last active December 17, 2018 02:21 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@lmarquine
lmarquine / index.html
Created May 19, 2018 08:02
jQuery TypeForm Clone
<div class="upform">
<form>
<div class="upform-header"></div>
<div class="upform-main">
@val-bubbleflat
val-bubbleflat / install.bash
Last active April 15, 2020 13:03
Install V8Js on Laravel Forge
sudo add-apt-repository ppa:pinepain/libv8-5.2
sudo apt-get update
sudo apt-get install libv8-5.2
sudo pecl install v8js
sudo su
echo "extension=v8js.so" >> /etc/php/7.1/fpm/php.ini
echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini
exit
sudo service nginx restart && sudo service php7.1-fpm restart
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active September 29, 2024 08:31
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files: