Skip to content

Instantly share code, notes, and snippets.

View benpoorker's full-sized avatar

Ben Poorker benpoorker

View GitHub Profile
@benpoorker
benpoorker / gist:39f5a9acbbb2882778ace0ef93cabb4b
Created April 10, 2024 20:12
Fix Laravel Valet favicon 404
https://github.com/laravel/valet/issues/375#issuecomment-629801919
Nginx is looking for a favicon.ico file at the root level.
Instead, for Laravel projects, it should look in the public folder.
Just add /public on the files paths inside your config file, and run valet restart:
location = /public/favicon.ico { access_log off; log_not_found off; }
location = /public/robots.txt { access_log off; log_not_found off; }
@benpoorker
benpoorker / locate-npmrc.md
Created February 11, 2022 21:17
Locate npmrc files

Command

npm config ls -l | grep config

Sample Output

; cli configs  
; userconfig /home/ubuntu/.npmrc   
globalconfig = "/data/storage/node-v0.8.8-linux-x64/etc/npmrc"   
userconfig = "/home/ubuntu/.npmrc"  
@benpoorker
benpoorker / mouse.lua
Created August 7, 2021 18:04 — forked from cwagner22/mouse.lua
Hammerspoon script to scroll with right click + trackball. Tested with MX Ergo.
-- https://github.com/tekezo/Karabiner/issues/814
-- HANDLE SCROLLING WITH MOUSE BUTTON PRESSED
local scrollMouseButton = 2
local deferred = false
overrideOtherMouseDown =
hs.eventtap.new(
{hs.eventtap.event.types.rightMouseDown},
function(e)
deferred = true