This file contains hidden or 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
| import json | |
| import os | |
| from collections import defaultdict | |
| import sys | |
| def validate_json_structure(data): | |
| """Validate the basic structure of the Bitwarden JSON export""" | |
| if not isinstance(data, dict): | |
| raise ValueError("Invalid JSON format: Root must be an object") | |
| if 'items' not in data: |
This file contains hidden or 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
| // Edit here => | |
| const CONFIG = { | |
| InputId: 100, | |
| Offset: 101189, // Initial count | |
| Factor: 0.01, // total = count * factor | |
| UnitOfMeasurement: 'm³', | |
| MinimalImpulseDuration: 2000, // ms | |
| UnpublishedCountThreshold: 2, | |
| DefaultPublishInterval: 60000, // ms | |
| MqttTopicNamespace: undefined, // Defaults to MqttConfig.topic_prefix or DeviceInfo.id |
This file contains hidden or 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 getLocalIpAddress() { | |
| return Object.values(os.networkInterfaces()) | |
| .flat() | |
| .filter(ifq => ifq.family === 'IPv4' && !ifq.internal && ifq.mac !== '00:00:00:00:00:00') | |
| .map(ifq => ({ address: ifq.address, cidr: ifq.cidr })); | |
| } |
This file contains hidden or 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/zsh | |
| patch=`pbpaste | base64` | |
| echo "echo '$patch' | base64 -d | patch -p1" | pbcopy | |
| echo "Clipboard converted" |
This file contains hidden or 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
| # .mov to .mp4 ^4k | |
| ffmpeg -i videoName.mov -vcodec h264 -acodec mp3 videoName.mp4 | |
| # .mov to .webm | |
| ffmpeg -i videoName.mov -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis videoName.webm | |
| ## TO BE CONTINUED |
This file contains hidden or 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/zsh | |
| ## A SHELL MOTIVATOR (zsh) | |
| ## ======================= | |
| ## Displays a random greeting and motivation. | |
| ## | |
| ## Assuredly to guarantee at least one of the following effects* | |
| ## | |
| ## It may: | |
| ## - cheer you up | |
| ## - boost your productivity |