Skip to content

Instantly share code, notes, and snippets.

View julienbourdeau's full-sized avatar
🏠
Working from home

Julien Bourdeau julienbourdeau

🏠
Working from home
View GitHub Profile
@julienbourdeau
julienbourdeau / generate_self_signed_certification.md
Created September 19, 2024 09:20 — forked from taoyuan/generate_self_signed_certification.md
Generation of a Self Signed Certificate

Generation of a Self Signed Certificate

Generation of a self-signed SSL certificate involves a simple 3-step procedure:

STEP 1: Create the server private key

openssl genrsa -out cert.key 2048

STEP 2: Create the certificate signing request (CSR)

openssl req -new -key cert.key -out cert.csr
WITH billable_subscriptions AS (
-- Calendar subscriptions
(
SELECT
subscriptions.id AS subscription_id
FROM
subscriptions
INNER JOIN plans ON plans.id = subscriptions.plan_id
INNER JOIN customers ON customers.id = subscriptions.customer_id
INNER JOIN organizations ON organizations.id = customers.organization_id
#!/bin/bash
#Generated by JetBrains Toolbox 2.2.3.20090 at 2024-04-10T10:51:26.013119
declare -a intellij_args=()
declare -- wait=""
for o in "$@"; do
if [[ "$o" = "--wait" || "$o" = "-w" ]]; then
wait="-W"
o="--wait"
@julienbourdeau
julienbourdeau / nginx-site.conf
Created January 7, 2024 08:24
Rails on a bare metal server
upstream puma {
server 127.0.0.1:3000;
}
server {
server_name yolo.com;
client_max_body_size 200m;
gzip on;
gzip_comp_level 4;
gzip_min_length 1000;
@julienbourdeau
julienbourdeau / GitDetails.php
Created October 22, 2022 08:37
Show current Git hash (as version) with Laravel Blade component
<?php
namespace App\View\Components\Admin;
use Illuminate\Support\Facades\Cache;
use Illuminate\View\Component;
class GitDetails extends Component
{
const REPO = 'julienbourdeau/julienbourdeau.com';
@julienbourdeau
julienbourdeau / boilerplate.html
Last active October 4, 2021 07:58
Best HTML boilerplate from @mmatuzo
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Unique page title - My Site</title>
<script type="module">
document.documentElement.classList.remove('no-js');
@julienbourdeau
julienbourdeau / setup.sh
Created January 14, 2021 19:08
New jetstream application
laravel new secret-project
composer require laravel/jetstream
php artisan jetstream:install livewire --teams
composer require barryvdh/laravel-debugbar --dev
@julienbourdeau
julienbourdeau / deploy.sh
Created November 14, 2020 08:03
Rebuild assets and deploy on Laravel Forge
#!/usr/local/bin/bash
# function e_header() { printf "\n${yellow}========== %s ==========${reset}\n" "$@" }
# function e_arrow() { printf "➜ $@\n" }
# TODO: Check if current branch is `master`
e_header "Rebuilding assets"
echo
@julienbourdeau
julienbourdeau / CreateUserCommand.php
Created June 28, 2020 16:40
Laravel Create User Command
<?php
namespace App\Console\Commands\Dev;
use App\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class CreateAdminUserCommand extends Command
@julienbourdeau
julienbourdeau / delegate.md
Last active June 3, 2020 11:07
Delegate read write to @Transporter