Skip to content

Instantly share code, notes, and snippets.

@ursuleacv
ursuleacv / deploy.sh
Created October 12, 2024 17:56 — forked from cagartner/deploy.sh
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@ursuleacv
ursuleacv / deployment_guide.md
Created October 12, 2024 17:52 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel
@ursuleacv
ursuleacv / cd.yml
Created October 12, 2024 17:51 — forked from madsem/cd.yml
GitHub Workflows For: Laravel CI with Mysql 8 & Laravel Vapor Deployment
name: Laravel Vapor CD
on:
release:
types: [ published, deleted ]
branches:
- master
jobs:
deploy_release:
runs-on: ubuntu-20.04
@ursuleacv
ursuleacv / README.md
Created October 12, 2024 17:49 — forked from mindfullsilence/README.md
Deployment scripts for atomic deployment of laravel applications in runcloud

Runcloud Automic Deployment Script For Laravel Applications

These scripts can be used to set up automic deployments in runcloud for laravel applications

@ursuleacv
ursuleacv / provision-preview.yaml
Created October 12, 2024 17:46 — forked from LarryBarker/provision-preview.yaml
Automatically deploy PRs to preview environments with the help of Laravel Forge
name: Preview Environment
on:
pull_request:
types: [opened]
env:
FORGE_API_TOKEN: ${{ secrets.FORGE_API_TOKEN }}
FORGE_SERVER_ID: ${{ secrets.FORGE_SERVER_ID }}
@ursuleacv
ursuleacv / quadratic_polynom.php
Created September 10, 2023 19:47
Calculate quadratic polynomial regression
<?php
function quadraticRegression($dataPoints) {
$sumX = 0;
$sumX2 = 0;
$sumX3 = 0;
$sumX4 = 0;
$sumY = 0;
$sumXY = 0;
$sumX2Y = 0;
@ursuleacv
ursuleacv / polyfit.php
Created September 9, 2023 19:44
polyfit equivalent in PHP
<?php
function polyfit($dependentValues, $independentValues, $countOfElements, $order, &$coefficients)
{
// Declarations...
// ----------------------------------
$maxOrder = 5;
$B = array_fill(0, $maxOrder + 1, 0.0);
$P = array_fill(0, (2 * ($maxOrder + 1)) + 1, 0.0);
$A = array_fill(0, (2 * ($maxOrder + 1)) * ($maxOrder + 1), 0.0);
@ursuleacv
ursuleacv / ci.yml
Created February 6, 2021 19:15 — forked from hhamon/ci.yml
Github Actions PHP CI
name: '[PROJECT NAME]'
'on':
push:
branches:
- master
- develop
- 'releases/**'
pull_request: null
env:
working_directory: ./application
@ursuleacv
ursuleacv / System Design.md
Created January 15, 2021 22:46 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ursuleacv
ursuleacv / nginx.conf
Created July 15, 2020 20:22 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx