Skip to content

Instantly share code, notes, and snippets.

View Linerre's full-sized avatar
Time waits for nobody

Noel Errenil Linerre

Time waits for nobody
View GitHub Profile
@Linerre
Linerre / configuration.nix
Created August 27, 2022 10:50 — forked from matthewjberger/configuration.nix
/etc/nixos/configuration.nix minimal configuration for using kde plasma
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@Linerre
Linerre / tlp
Created November 12, 2021 06:12 — forked from pauloromeira/tlp
My TLP config file (/etc/default/tlp) for ThinkPad
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
# dir: /etc/default/tlp
# Hint: some features are disabled by default, remove the leading # to enable
# them.
# Set to 0 to disable, 1 to enable TLP.
@Linerre
Linerre / statusline.vim
Created October 9, 2021 09:06 — forked from suderman/statusline.vim
Scrooloose Statusline
"statusline setup
set statusline=%f "tail of the filename
"display a warning if fileformat isnt unix
set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
set statusline+=%*
"display a warning if file encoding isnt utf-8
set statusline+=%#warningmsg#

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@Linerre
Linerre / mail-tools.gs
Created March 19, 2020 01:44
Some Google Apps scripts to keep Gmail snappy
// Labels required: Review/Discard, Review/Keep, Kept
// Gmail's importance markers should be turned on
// Star a message to signal it's important
// (NOTE: messages will be automatically unstarred after treatment, e.g., after being auto-removed from Review/Discard)
/* tidyInbox.gs (run every 15 minutes) */
function tidyInbox() {
// Apply label "Kept" to starred threads with label "Review/Keep"
label('Kept').addToThreads(find('is:starred label:Review/Keep'));