Skip to content

Instantly share code, notes, and snippets.

View adrian-ortega's full-sized avatar

Adrian Ortega adrian-ortega

View GitHub Profile
@adrian-ortega
adrian-ortega / Model.php
Created September 6, 2022 17:50
General Laravel and Lumen Helpers
<?php
namespace App\Models;
use Closure;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model as BaseModel;
use Illuminate\Support\Carbon;
/**
@adrian-ortega
adrian-ortega / gitflow-breakdown.md
Created January 22, 2021 19:52 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@adrian-ortega
adrian-ortega / README.md
Created January 14, 2018 00:25 — forked from barneycarroll/README.md
Lock and unlock a page's scroll position.

jquery.scrollLock.js

Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock() locks the body in place, preventing scroll until it is unlocked.

// Locks the page if it's currently unlocked
$.scrollLock();

// ...or vice versa
@adrian-ortega
adrian-ortega / simple.htaccess
Created July 31, 2017 16:49
A simple .htaccess file to be used with PHP MVC applications like Slim, Codeigniter and custom creations
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]