Skip to content

Instantly share code, notes, and snippets.

View gilles6's full-sized avatar

Gilles gilles6

  • B3TSI
  • France
View GitHub Profile
@james2doyle
james2doyle / NuxtValetDriver.php
Last active July 25, 2022 16:51
A Laravel Valet driver for running generated Nuxt.js sites. This driver assumes you have not changed the default public path (/dist) in the nuxt.config.js
<?php
/**
* NuxtValetDriver for running compiled nuxt.js sites
*/
class NuxtValetDriver extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
@AndrewKvalheim
AndrewKvalheim / export-selected-regions.scm
Created September 11, 2012 21:56
GIMP script for automatically saving all selections
;;; Non-interactively save all selected regions as separate files
(define (script-fu-export-selected-regions image drawable)
;; Start
(gimp-image-undo-group-start image)
;; If there are selections
(when (= 0 (car (gimp-selection-is-empty image)))
(let ((number 1) (prefix "") (suffix ""))
;; Construct filename components
(let* ((parts (strbreakup (car (gimp-image-get-filename image)) "."))