Skip to content

Instantly share code, notes, and snippets.

View taskinoz's full-sized avatar

taskinoz

View GitHub Profile
<?php
// Better Script: https://stackoverflow.com/questions/900207/return-a-php-page-as-an-image
// open the file in a binary mode
$name = 'path/to/image.jpg';
$fp = fopen($name, 'rb');
// send the right headers
header("Content-Type: image/png");
header("Content-Length: " . filesize($name));
// ==UserScript==
// @name Custom Dark Mode
// @namespace https://taskinoz.com
// @version 0.1
// @description A custom dark mode that activates at the times you want
// @author You
// @match https://*/*
// @grant none
// ==/UserScript==