Skip to content

Instantly share code, notes, and snippets.

@ursuleacv
ursuleacv / microgpt.py
Last active February 11, 2026 22:33 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT LLM in pure, dependency-free Python.
Differences from GPT-2 are minor: rmsnorm instead of layer norm, no biases, square ReLU instead of GeLU nonlinearity.
The contents of this file is everything algorithmically needed to train a GPT. Everything else is just efficiency.
Art project by @karpathy.
"""
import os # for os.path.exists
import math # for math.log, math.exp
import random # for random.seed, random.choices
@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 / 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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh