Skip to content

Instantly share code, notes, and snippets.

@tobia
tobia / index.html
Created October 17, 2022 17:11 — forked from feo52/index.html
css hacks 2022
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<title>css hack</title>
<style>
body { font-family: monospace; }
summary { list-style: none; }
summary::-webkit-details-marker { display:none; }
@tobia
tobia / YouTube - Hide Live Chat.js
Created November 29, 2021 19:52
YouTube - Hide Live Chat (by @lbmaian)
// ==UserScript==
// @name YouTube - Hide Live Chat
// @namespace https://gist.github.com/LazyMammal/1c60c45e9df26602f688d025f3b20f0c#gistcomment-3656586
// @version 0.4
// @description Hide live chat by default on live streams
// @author LM, bastiMQ, IrisNebula, lbmaian
// @match https://www.youtube.com/*
// @exclude https://www.youtube.com/embed/*
// @run-at document-end
// @grant none
@tobia
tobia / doge.md
Created August 4, 2016 23:49 — forked from cpdean/doge.md
YOU'RE WELCOME, INTERNET. -- if you search for an ascii doge, you don't get anything great that you can copy paste. found a silly gif (http://cmang.org/ascii/cm-doge-bw.gif) and i have transcribed it for all of you

no clue who made this, but i have transcribed it here:

                Y.                      _   
                YiL                   .```.  
                Yii;                .; .;;`.    
                YY;ii._           .;`.;;;; :    
                iiYYYYYYiiiii;;;;i` ;;::;;;;    
            _.;YYYYYYiiiiiiYYYii  .;;.   ;;; 
 .YYYYYYYYYYiiYYYYYYYYYYYYii;` ;;;; 
@tobia
tobia / luminv.c
Created September 7, 2017 21:43
Fast luminance inversion (aka. color invert + hue rotate 180°)
// Fast luminance inversion.
int luminv(int rgb) {
int r = rgb >> 16,
g = rgb >> 8 & 0xff,
b = rgb & 0xff;
switch (((r > g) << 1 | (g > b)) << 1 | (b > r)) {
case 4: // r > b > g
case 3: // g > b > r
return rgb + (255 - r - g) * 0x10101;
case 2: // g > r > b
@tobia
tobia / TryCatchTagLib.groovy
Created July 2, 2015 12:56
Simple try & catch taglib for Grails GSP views.
// Simple try & catch for GSP views.
//
// Usage:
//
// <g:try>
// view snippet that needs to be checked
// </g:try>
// <g:catch>
// alternative view code in case of errors;
// the exception is available as ${exception}
@tobia
tobia / Japanese Dvorak.reg
Created April 22, 2021 17:25
Japanese IME with Dvorak
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411]
"Layout File"="kbddvp.dll"
@tobia
tobia / gist:1ee850f521963eb811e6ee2097afa5bd
Created November 16, 2019 10:06
Hide Google "People also search for" and other stuff
.s + div, .exp-outline, .kno-kp, .mnr-c, .g-blk, #extrares
@tobia
tobia / gnome-terminal-bold-fonts.sh
Created June 9, 2019 14:04 — forked from arturfog/gnome-terminal-bold-fonts.sh
disable bold fonts in gnome terminal
dconf write /org/gnome/terminal/legacy/profiles:/:<id>/allow-bold false
@tobia
tobia / test_count.rs
Created April 12, 2019 17:38
Simple harness to measure macro expansion time
// #![recursion_limit="1003"]
// macro_rules! count {
// () => (0usize);
// ($x:tt $($xs:tt)*) => (1usize + count!($($xs)*));
// }
macro_rules! count {
() => (0usize);
($one:tt) => (1usize);
($($pairs:tt $_p:tt)*) => (count!($($pairs)*) << 1usize);
@tobia
tobia / 8kzenrecover.py
Last active November 16, 2018 00:09 — forked from lkraav/8kzenrecover.py
8kzenrecover.py (Zen Vision M data recovery script) updated to work without LRU.py
#!/usr/bin/python
# Copyright 2007 by Tobia Conforto <tobia.conforto@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License