This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function markArchivedAsRead() { | |
var delayDays = 7; // will only impact emails more than 7 days old | |
var maxDate = new Date(); | |
maxDate.setDate(maxDate.getDate()-delayDays); // what was the date at that time? | |
//Look for unread emails that are older than 14 days and exclude starred emails | |
var threads = GmailApp.search('label:unread older_than:14d -is:starred'); | |
GmailApp.markThreadsRead(threads); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run script in the root directory of the site | |
#Fix tag based functions that have eol and tabs in the tag | |
find . -name '*.cf*' -not -name '*.json' | xargs perl -i -0pe 's/(?:\G|\<cf)(?:(?!\>).)*\K\n\t+/ /g' | |
#Fix script based functions that also have eol and tabs | |
find . -name '*.cf*' -not -name '*.json' | xargs perl -i -0pe 's/(?:\G(?!\A)|\tpublic|\tremote|\tprivate)(?:(?!\)).)*?\K\n\t+/ /g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Relocate Unread Count for Gmail | |
// @namespace http://elomental.com/ | |
// @version 1.0 | |
// @description Relocate the unread count to the left for Gmail labels | |
// @author Ryan Reaves | |
// @match https://mail.google.com/* | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to .zshrc or .bashrc | |
alias pg=pingout | |
pingout(){ | |
ping 8.8.8.8 | awk -F" |=" '/time/{if($10>0 && $10<=70){printf "\033[1;32m%i\n\033[0m", $10}; if($10>70 && $10<=99){printf "\033[33m%i\n\033[0m", $10};if($10>99){printf "\033[31m%i\n\033[0m", $10 }}' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Fixes the macOS keymap on the host to swap Alt & Cmd | |
# This allows for proper key location when using Virtual Machines under VirtualBox | |
# Support for Vmware and Parallels can easily be added via the app names | |
# Also Virtualbox does not detect the keyswap initially, so another app has to | |
# steal focus and then return focus to VirtualBox. Unknown if the same applies | |
# to the other VM solutions. | |
from AppKit import NSWorkspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/tryone144/compton | |
# Install all dependencies | |
sudo apt install libx11-dev libxcomposite-dev libxdamage-dev libxfixes-dev libxrender-dev libxrandr-dev libxinerama-dev pkg-config libconfig-dev libpcre3-dev libdbus-1-dev libdrm-dev mesa-common-dev libgl1-mesa-dev xsltproc | |
# Do this separate to install 1mb instead of 500mb+ | |
sudo apt-get --no-install-recommends install asciidoc | |
# Make the main program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compton Configuration, courtesy of Xubuntu Developers | |
# Please note that Compton is not supported by Xubuntu and may not work | |
# correctly for you. This file is provided as a set of sane defaults and is in | |
# no way endorsed by the Xubuntu team. | |
# | |
# About Compton: https://github.com/chjj/compton | |
# Heavily based on: http://bit.ly/1l5OrzL | |
# Sample settings: https://github.com/chjj/compton/blob/master/compton.sample.conf | |
# --- Backend (OpenGL used by default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Let's admit it.. Ubuntu Mate's GUI is very uninspired | |
# possibly on purpose, who knows. This script attempts | |
# to quickly undo the most of what the distro authors | |
# thinks looks good w/ more normal defaults. | |
# | |
# Personality is fine, but UI designers that do a poor | |
# job need to make sure there's an easy undo button. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" https://vi.stackexchange.com/questions/2572/detect-os-in-vimscript | |
" Comment - cross-platform settings | |
set nocompatible | |
set mouse=a | |
" OS Specific | |
if has('win32') | |
" Windows | |
" arrow keys | |
set term=pcansi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sleep mode does not work well on my MacBook Pro 2017 model with Windows 10 build 2004 (July 2020) so this is needed | |
1) Install PsShutdown.exe to C:\Windows | |
https://docs.microsoft.com/en-us/sysinternals/downloads/pstools | |
2) Install System Silencer | |
https://apps.nozavi.com/apps/system-silencer/download/file/4-system-silencer-zip.html | |
3) Create batch file to run psshutdown, please in directory with system silencer, set System Silencer to autostart | |
psshutdown -d -t 0 | |
4) Install PowerSchemeSwitcher | |
https://www.microsoft.com/en-us/p/powerplanswitcher/9nblggh556l3?activetab=pivot:overviewtab | |
5) Configure on AC and off AC power plans |
OlderNewer