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
<!DOCTYPE html> | |
<html> | |
<style> | |
.container, | |
.buttons { | |
margin: 5px; | |
width: 95%; | |
padding: 2px; | |
font-size: 13px; | |
} |
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
/** | |
* Changes the variable validation if needed | |
*/ | |
var validation = { | |
sheet: 'Variabelen', | |
range: 'E2:E12' | |
} | |
// Simple trigger for the onInstall event |
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
// V4 ~ Still slow damnit | |
function onEdit(e) { | |
let triggeringSheets = new Array( // only in these sheets | |
"sheet1", | |
"sheet2", | |
"sheet3" | |
); | |
let triggeringColumns = new Array( // only in these columns | |
// BrondataFlevoland | |
15, // Column O == 15 |
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
(defn get-position | |
[movement | |
& {:keys [steps] :or {steps 2}}] | |
(p/let [editor ^js vscode/window.activeTextEditor | |
_ (vscode/commands.executeCommand movement) | |
insert-position (.-active (eu/current-selection)) | |
insert-position-2 (.with insert-position (.-line insert-position) (max 0 (- (.-character insert-position) steps))) | |
range-before-insert-position (.with (eu/current-selection) insert-position-2 insert-position) | |
text-before-insert-position (.getText (.-document editor) range-before-insert-position) | |
position-after (.with insert-position (.-line insert-position) (max 0 (+ (.-character insert-position) 1))) |
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
# Based on UPS Lite v1.1 from https://github.com/xenDE | |
# | |
# functions for get UPS status - needs enable "i2c" in raspi-config | |
# | |
# https://github.com/linshuqin329/UPS-Lite | |
# | |
# For Raspberry Pi Zero Ups Power Expansion Board with Integrated Serial Port S3U4 | |
# https://www.ebay.de/itm/For-Raspberry-Pi-Zero-Ups-Power-Expansion-Board-with-Integrated-Serial-Port-S3U4/323873804310 | |
# https://www.aliexpress.com/item/32888533624.html | |
# |
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/env python3 | |
# Hello fellow hackers! My name is Defalt | |
# I built a very basic version of this tool a long time ago and recently did a re-write | |
# The first re-write had some awkward usage of the argparse module, so this update is going to fix it | |
# Original version: http://pastebin.com/J5NLnThL | |
# This will query the MaxMind database to get an approximate geolocation of an IP address | |
# Happy hacking! -Defalt | |
# 2023 Python3 with updated GeoIP database version by LouD |
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/env bash | |
## | |
# Script for displaying listening and established connections using ss | |
# Prints information and complete command lines using ps in table form output | |
# NOTE: Can get messy output with long command lines | |
# | |
# LouD 2023-09-2023 | |
## Example output: |
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
$ports = @(80, 443, 10000, 3000, 5000); | |
$wslAddress = bash.exe -c "ip addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'"; | |
if ($wslAddress -match '^(\d{1,3}\.){3}\d{1,3}$') { | |
Write-Host "WSL IP address: $wslAddress" -ForegroundColor Green; | |
Write-Host "Ports: $ports" -ForegroundColor Green; | |
} | |
else { | |
Write-Host "Error: Could not find WSL IP address." -ForegroundColor Red; |
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
[:div "SCITTLE JS"] | |
[:div#scittle-test | |
[:script {:type "application/x-scittle"} | |
(pr-str | |
'(defn my-alert [] | |
(js/alert "You clicked! ")) | |
;; export function to use from JavaScript: | |
'(set! (.-my_alert js/window) my-alert))]] | |
[:div | |
[:button.text-white.shadow.rounded.btn.bg-success.bg-gradient.border-info {:onclick "my_alert()"} |
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
// Code for getting the values of cells by their fill color | |
/**************************************************************************************************** | |
By LouD 2022-11-29 (adaption of countColoredCells()) | |
Get cell value(s) based on the cell color in Google Sheets in the cell + rows where the formula is in | |
Use =returnColoredCelldata(RANGE; CELLID) or =returnColoredCelldata(RANGE, CELLID) depending on your region | |
where RANGE is the cell range to count and CELLID is the CELL to compare the colors with. | |
*****************************************************************************************************/ | |
function returnColoredCelldata (cellRange, colorRef) { | |
var activeRange = SpreadsheetApp.getActiveRange(); |
NewerOlder