Skip to content

Instantly share code, notes, and snippets.

View gabgren's full-sized avatar

Gabriel Grenier gabgren

View GitHub Profile
@gabgren
gabgren / aescripts-product-page.js
Created October 29, 2025 01:18
Tampermonkey - aescripts product page
// ==UserScript==
// @name aescripts_product
// @match https://aescripts.com/*
// @grant GM_xmlhttpRequest
// @run-at document-idle
// @version 1
// @description inject product page
// @connect localhost
// ==/UserScript==
@gabgren
gabgren / switch-google-user.js
Created October 14, 2022 18:22
switch google user in url
/*
This is intended to be saved as a bookmark in the bookmarks bar
it executes a javascript that switches the google user id on the current page, intead of opening a new tab
works on google drive, gmail, google meet, etc.
usage:
- replace the user ID in the first line below
- copy/paste this script as a new browser bookmark (chrome or other) with the prefix "javascript:"
- name/rename the bookmark to the username matching this user id
- do this for every user you have. I personally place all of the bookmarks under a folder called "Switch user" at the beginning of my bookmark bar
@gabgren
gabgren / hdf5_example.py
Last active August 4, 2022 16:14
Example of storing and reading PNG with alpha in HDF5 dataset
import glob
import h5py
from PIL import Image
import numpy as np
import time
nfiles = 2
width = 1000
height = 800
@gabgren
gabgren / JSServiceProvider.php
Created July 11, 2022 17:48
@js Blade Directive for including javascript file
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Blade;
class JSServiceProvider extends ServiceProvider
{
/**