Skip to content

Instantly share code, notes, and snippets.

View nathanbarrett's full-sized avatar

Nathan Barrett nathanbarrett

View GitHub Profile
SELECT TABLE_SCHEMA, TABLE_NAME, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024 / 1024, 2) AS `Size / GB`
FROM information_schema.TABLES
ORDER BY (DATA_LENGTH + INDEX_LENGTH) DESC;
@vicgonvt
vicgonvt / deployment_guide.md
Last active July 17, 2025 01:37
Deployment Guide for Ubuntu Server from Scratch with Laravel
@javilobo8
javilobo8 / download-file.js
Last active May 13, 2025 05:55
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@PurpleBooth
PurpleBooth / README-Template.md
Last active December 10, 2025 21:19
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@compact
compact / dropzone-directive.js
Last active October 25, 2025 18:19
AngularJS directive for Dropzone.js
/**
* An AngularJS directive for Dropzone.js, http://www.dropzonejs.com/
*
* Usage:
*
* <div ng-app="app" ng-controller="SomeCtrl">
* <button dropzone="dropzoneConfig">
* Drag and drop files here or click to upload
* </button>
* </div>