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(); |
This file has been truncated, but you can view the full file.
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
extDB2: Version: 66 | |
extDB2: https://github.com/Torndeco/extDB2 | |
extDB2: Windows Debug Version | |
Message: All development for extDB2 is done on a Linux Dedicated Server | |
Message: If you would like to Donate to extDB2 Development | |
Message: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2SUEFTGABTAM2 | |
Message: Also leave a message if there is any particular feature you would like to see added. | |
Message: Thanks for all the people that have donated. | |
Message: Torndeco: 20/02/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
10:45:03 "[extDB2] Sleep [4]: 2670.41" | |
10:45:08 "WASTELAND SERVER - Money Mission waiting to run: mission_SunkenTreasure" | |
10:45:08 Performance warning: SimpleSerialization::Write 'messageSystem' is using type of ',TEXT' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types | |
10:45:08 Performance warning: SimpleSerialization::Read 'messageSystem' is using type of ,'TEXT' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types | |
10:45:10 "TERRITORY SYSTEM: _realLoopTime was 10.0171" | |
10:54:53 "onPlayerDisconnected - ["Basti","76561198018519179"]" | |
10:54:53 "onPlayerDisconnected - ["Artem23RUS","76561198203009930"]" | |
10:54:53 No player found for channel 980001600 - message ignored | |
10:54:53 No player found for channel 980001600 - message ignored | |
10:54:53 No player found for channel 980001600 - message ignored |
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
{ | |
"ADVERTS": [ | |
"Want to know the available commands? Type <orange>/help<end>.", | |
"Respect the server <orange>/rules<end>.", | |
"This server is running <orange>Oxide 2<end>.", | |
"<red>Cheat is strictly prohibited.<end>", | |
"Type <orange>/map<end> for the server map link.", | |
"You are playing on: <lime>{server.hostname}<end>", | |
"<orange>Players Online: <lime>{players}<end> / <lime>{server.maxplayers}<end> Sleepers: <lime>{sleepers}<end><end>", | |
"The game time is <lime>{gametime}<end>", |
NewerOlder