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
p = Calc-MyPatience() | |
s = Get-YourBullshit() | |
if (p-s <= 0): | |
print('Take a Break') | |
-- OR -- | |
import mySanity | |
import you |
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
! name: Vilsack Goggle | |
! description: remove social media, boost social content | |
! public: true | |
! author: John Vilsack | |
! avatar: #9244e0 | |
$discard | |
$boost=1,site=reddit.com | |
$boost=1,site=www.reddit.com | |
$boost=1,site=old.reddit.com |
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
# BTW, I use Arch | |
setfont ter-132n | |
Wifi (wlan0): | |
- iwctl | |
- station wlan0 connect <ssid> | |
- exit | |
- ping google.com | |
- pacman -Syy | |
- pacman -S reflector | |
- reflector --verbose -l 10 -f 5 -c US -p https --save /etc/pacman.d/mirrorlist |
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
$TIM = Get-CimInstance Win32_LogicalDisk -Filter "DeviceID='C:'" | Select-Object -ExpandProperty Size | |
$patience = Get-CimInstance Win32_LogicalDisk -Filter "DeviceID='C:'" | Select-Object -ExpandProperty FreeSpace | |
$stress = ($TIM - $patience) | |
if (($stress / $TIM)*100) -gt 50) {Write-Host "Take a Break"} | |
# 1. $TIM is the size of C:. It never changes, so it is a constant and in all caps | |
# 2. $patience is the FreeSpace left. It changes and is all lowercase because it is variable | |
# 3. $stress is the Used Space. This is the Total Disk minus whatever is free. | |
# 4. $stress divided by TIM then multiplied by 100 tells you a percentage of how much total stress you are dealing with | |
# 5. If the percentage of stress is greater than 50, write "Take a Break" to the window. |
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 getThreadsByLabel(label) { | |
const threads = GmailApp.getUserLabelByName(label).getThreads(); | |
var threadList = []; | |
for (i = 0; i < threads.length; i++) { | |
threadList.push(threads[i].getId()); | |
} | |
delete threads; | |
return threadList; |
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
// This script runs every time a cell is changed | |
function onEdit(e) { | |
var thisSheet = SpreadsheetApp.getActiveSheet(); | |
var editedCell = e.range.getA1Notation(); | |
var editedRow = e.range.getRow(); | |
var editedCol = e.range.getColumn(); | |
var editedA1Col = columnToLetter(editedCol); | |
// @@ DEBUG | |
thisSheet.getRange('I10').setValue(editedCell); |
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
// This is the code to edit | |
function evalRow(thisSheet, editedRow) { | |
// EDIT THE COLUMNS HERE TO CHANGE WHICH ROWS ARE IN ARRAY | |
var watchedRange = "A"+editedRow+":E"+editedRow; | |
var rowArray = thisSheet.getRange(watchedRange); | |
var rowValues = rowArray.getValues(); | |
// @@ DEBUG |
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
// Fixes SMALL oversight of not being able to work with A1 notation | |
function columnToLetter(column) | |
{ | |
var temp, letter = ''; | |
while (column > 0) | |
{ | |
temp = (column - 1) % 26; | |
letter = String.fromCharCode(temp + 65) + letter; | |
column = (column - temp - 1) / 26; | |
} |
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
// This script runs every time a cell is changed | |
function onEdit(e) { | |
var thisSheet = SpreadsheetApp.getActiveSheet(); | |
var editedCell = e.range.getA1Notation(); | |
var editedRow = e.range.getRow(); | |
var editedCol = e.range.getColumn(); | |
var editedA1Col = columnToLetter(editedCol); | |
// @@ DEBUG |
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 onConnectivityChange(state) { | |
console.log("Connection is: " + state); | |
} | |
function onBarcodeScanned(data) { | |
console.log(data.barcode); | |
} | |
var app = { | |
initialize: function() { |
NewerOlder