Skip to content

Instantly share code, notes, and snippets.

@rifazn
rifazn / dark-toggle.sh
Last active September 19, 2021 14:24
A shell script to toggle between light and dark variants of a GTK theme.
#!/bin/sh
# A small POSIX compliant script to toggle between dark and light variant
# of a theme for GNOME based desktops.
# Copyright (C) 2021 Rifaz Nahiyan
# This code is licensed under the MIT License.
# View the license in its entirety at: https://opensource.org/licenses/MIT
get_current_theme () {
@fathyar
fathyar / SuperBookmarkDesktop.css
Last active March 29, 2020 05:11
My custom CSS of SuperBookmarkDesktop the Chrome extension
:root {
--checkbox-unchecked-dark : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABuvAAAbrwFeGpEcAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAALFQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgICAgIKioqNzc3NjY2Ojo6PT09Pz8/QUFBQ0NDQUFBRERER0dHSkpKSkpKS0tLS0tLSkpKXV1dWlpaXFxcXFxcXV1dXFxcXV1dZ2dnaGhoaGhoZ2dnX19fX19fVVVVVlZWV1dXWFhYWVlZWlpaW1tbXFxcXV1dXl5eX19fYGBgYWFhYmJiY2NjZGRkZWVlZmZmZ2dnaGhoaWlpA99w+gAAACZ0Uk5TAAEOFhkdHiAhMTw9PkNFR1BTU1NWYWJjZI+RlZbc3d36+vv8/f7h8etwAAAAoElEQVQoz9WTywrCQBAEu2dGE8GI+v//J0jwcQnZbHbHgzezm4sHsa5FMTDQBCkklrhnd1IU0KX3BKRsVJzaU6G+jQ91VZ4PnWf/BDtBgBHNdvRCzTY8KdRuBgsgHpUCnVEhCgwG1vwmGli1IAz1GPha//L2qhas8s9vmes6QiXrnmWudzfPYy2f3BUyTENXkJe+R3qPqGkWNgQgZa5P8AWR4EZhVXeThQAAAABJRU5ErkJggg==");
--checkbox-unchecked-insensitive-dark : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABuvAAAbrwFeGpEcAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAIRQTFRFAAAAAAAAAAAA
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@ilius
ilius / article-style.css
Last active April 25, 2025 04:46 — forked from bangedorrunt/article-style.css
GoldenDict Dark Theme
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: #201F1F;
color: white;
font-family: Bookerly, Segoe UI, Palatino Linotype, Arial Unicode MS;
}
@afair
afair / http_request.php
Last active December 24, 2022 06:18
PHP Function to make a remote HTTP request (POST, Authentication, API, Files, etc.) and returns the response
<?php
/**
* Makes a remote HTTP request and returns the response.
*
* @author Allen Fair <[email protected]>
* @copyright 2018 Allen Fair
* @license https://opensource.org/licenses/MIT MIT
*
* @param string $url The full URL endpoint: "https://example.com/endpoint"
* @param array $opt An Associative Array of extended request options
@bittercoder
bittercoder / convert.sh
Last active December 4, 2024 17:25
Convert .heic files to .jpg on linux (coming from an iOS11 device over USB)
# download release from github: https://github.com/monostream/tifig/releases and install at ~/tools/tifig
# then run these commands in the folder (just to keep things simple we normalize the file extension case before proceeding).
for f in *.HEIC; do mv "$f" "`echo $f | sed s/.HEIC/.heic/`"; done
for file in *.heic; do echo "~/tools/tifig -v -p $file ${file/%.heic/.jpg}"; done
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
@charveey
charveey / 51-noto-color-emoji.conf
Created October 1, 2017 01:14
Enabling Color Emoji in Chrome (Linux)
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
You need Noto Color Emoji installed in your machine.
Save this file in ~/.config/fontconfig/conf.d/ or /etc/fonts/conf.d/ (system-wide)
-->
<fontconfig>
<match target="scan">
<test name="family">
@NickSeagull
NickSeagull / ubuntu-bloat-removal.sh
Last active April 6, 2025 10:56
Updated Jan 22nd, 2024 - Simple command to remove all "bloatware" from ubuntu
sudo apt-get remove \
aisleriot \
brltty \
duplicity \
empathy \
empathy-common \
example-content \
gnome-accessibility-themes \
gnome-contacts \
gnome-mahjongg \
@fathyar
fathyar / AND_OR_NOT
Created October 18, 2016 14:23 — forked from oliverdoetsch/AND_OR_NOT
Blogger: Globally conditional data tags for all page types
#AND
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--search_page AND index_page-->
</b:if>
</b:if>
#OR