Skip to content

Instantly share code, notes, and snippets.

View vmitchell85's full-sized avatar

Vince Mitchell vmitchell85

View GitHub Profile
@Lelectrolux
Lelectrolux / README.md
Last active February 6, 2024 10:07
Tailwindcss breakpoint inspector, initial idea from https://gist.github.com/jonsugar/6bce22bd7d3673294caad36046c2b7cb

Tailwindcss plugin that adds a small box in the lower right corner of the screen showing the current breakpoint

Uses a position: fixed after css pseudo element on the body, so no extra markeup, and it get the breakpoint list by itself.

@sahibalejandro
sahibalejandro / deploy.sh
Last active January 8, 2024 17:48
Deploy script for Laravel projects.
# Shutdown the laravel app
php artisan down
# Install new composer packages
composer install --no-dev --prefer-dist
# Cache boost configuration and routes
php artisan cache:clear
php artisan config:cache
php artisan route:cache
@tanner0101
tanner0101 / LaravelExceptionHandler.php
Last active October 29, 2016 11:08
Use this exception handle for your Laravel 5 based JSON APIs. It serves properly formatted JSON responses instead of the default Laravel HTML error pages.
<?php
/**
* LaravelExceptionHandler.php
*
* Use this exception handle for your Laravel 5 based JSON APIs.
* It serves properly formatted JSON responses instead of the default Laravel HTML error pages.
*
* <https://gist.github.com/tannernelson/cb2d981a3cfeabd425b8>
*/
@mariozig
mariozig / migrate_repo.sh
Last active December 22, 2022 08:32
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@simplethemes
simplethemes / youtube-url.php
Created November 21, 2013 23:00
Extracts YouTube video ID from various URL structures
<?php
$url = array (
'http://youtu.be/dQw4w9WgXcA',
'http://www.youtube.com/embed/dQw4w9WgXcB',
'http://www.youtube.com/watch?v=dQw4w9WgXcC',
'http://www.youtube.com/?v=dQw4w9WgXcD',
'http://www.youtube.com/v/dQw4w9WgXcE',
'http://www.youtube.com/e/dQw4w9WgXcF',
'http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcG',
@takien
takien / youtubeID.js
Last active December 31, 2023 05:46
Get YouTube ID from various YouTube URL using JavaScript
/**
* Get YouTube ID from various YouTube URL
* @author: takien
* @url: http://takien.com
* For PHP YouTube parser, go here http://takien.com/864
*/
function YouTubeGetID(url){
var ID = '';
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);
@malarkey
malarkey / Contract Killer 3.md
Last active March 16, 2024 15:13
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………