Skip to content

Instantly share code, notes, and snippets.

View garrett's full-sized avatar
🏠
Working from home, as usual 😉

Garrett LeSage garrett

🏠
Working from home, as usual 😉
View GitHub Profile
@garrett
garrett / Fedora-LUKS-discard.txt
Created July 7, 2023 15:21
Fix discards on SSD / NVMe with LUKS (encryption) on Fedora
sudo cryptsetup --allow-discards --persistent refresh /dev/mapper/luks*
@garrett
garrett / mobile.css
Created February 2, 2023 21:53
Daring Fireball mobile fix
@media screen and (max-width: 900px) {
body {
font-size: max(16px, 3.5vmin);
min-width: revert;
}
#Box {
width: auto;
padding: 0 1.5rem;
overflow: hidden;
@garrett
garrett / power_limit.conf
Last active May 1, 2023 19:12
ThinkPad 14s overheating issues
# /etc/tmpfiles.d/power_limit.conf
# MSR
# PL1
w /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw - - - - 44000000
w /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_time_window_us - - - - 28000000
# PL2
w /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_1_power_limit_uw - - - - 44000000
w /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_1_time_window_us - - - - 2440
# MCHBAR
@garrett
garrett / mushroomkingdom-gridify.user.css
Created June 29, 2019 20:04
Add grids to NES Mario maps on themushroomkingdom.net
/* ==UserStyle==
@name Mushroom Kingdom Gridify
@namespace https://gist.github.com/garrett/27db37934769262249ff76ac42cba7e1
@version 1.0.0
@description Add a grid to Super Mario Bros. level maps
@author Garrett LeSage
==/UserStyle== */
@-moz-document domain("themushroomkingdom.net") {
div.mapwrapper {
--block: 16px; /* blocks are 16px × 16px */
@garrett
garrett / vim-responsive.css
Last active May 18, 2018 09:26
vim.org responsive hacks (for mobile support)
td {
/* Bump up line height to make text easier to read */
line-height: 1.4;
}
img:not([src*=spacer]) {
/* Non-spacer images should fit the width and scale down if necessary */
max-width: 100%;
height: auto;
}
@garrett
garrett / librsvg.thumbnailer
Created April 7, 2017 17:59
SVG thumbnails in GNOME 3.24.0
[Thumbnailer Entry]
TryExec=/usr/bin/gdk-pixbuf-thumbnailer
Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
MimeType=image/svg+xml;image/svg+xml-compressed;
@garrett
garrett / keybase.md
Created August 17, 2016 09:42
keybase proof

Keybase proof

I hereby claim:

  • I am garrett on github.
  • I am garrettl (https://keybase.io/garrettl) on keybase.
  • I have a public key ASC20dKKcJV2JaZexyAVB6uxdEKztptVgwoWh4NOqoaHNgo

To claim this, I am signing this object:

@garrett
garrett / endless-images-download.md
Created June 2, 2016 09:51
Download EndlessOS 2.6.3 Images
@garrett
garrett / webapp-ui-styleguide.md
Created March 8, 2016 14:38
Opinionated UI Styleguide for Web Applications

Opinionated UI Styleguide for Web Applications

Introduction

Web applications are different from web documents.

Web documents exist to share information in an article-like manner. This consists of articles, blogs, wiki pages, and so on. Some web documents have a few app-like elements to enhance their designs, but all web documents should fall back to working in every browser, even when JavaScript is turned off.

A web application, however, relies on JavaScript to function. Web applications need enhanced interaction.