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 | |
# This script configures suspend mode and prepares for hibernation on Ubuntu 24.04 | |
# It ensures swap space is sufficient and configures GRUB for proper resume settings | |
# Check if the script is run as root or with sudo | |
if [ "$(id -u)" -ne 0 ]; then | |
echo "This script must be run as root or with sudo." | |
exit 1 | |
fi |
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 Google/Bing to DuckDuckGo Redirector | |
// @namespace http://smugzombie.com | |
// @version 1.1 | |
// @description Redirects Google/Bing searches to DuckDuckGo. | |
// @author Ron Egli <[email protected]> (github.com/smugzombie) | |
// @match *://www.google.com/* | |
// @match *://www.bing.com/* | |
// @grant none | |
// ==/UserScript== |
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 Highlight and Download Media on sites | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Highlight and add a download button for images and videos on a webpage | |
// @author Ron Egli <github.com/smugzombie> | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
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
const crypto = require('crypto'); | |
function stringToMacAddress(input) { | |
// Create an MD5 hash of the input string | |
const hash = crypto.createHash('md5').update(input).digest('hex'); | |
// Convert the hash to MAC address format | |
const macAddress = hash.match(/.{1,2}/g).slice(0, 6).join(':'); | |
return macAddress; |
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
const dns = require('dns'); | |
const tls = require('tls'); | |
const email = process.argv[2]; | |
if (!email) { | |
console.error('Please provide an email address as an argument'); | |
process.exit(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
const dns = require('dns'); | |
const net = require('net'); | |
const email = process.argv[2]; | |
if (!email) { | |
console.error('Please provide an email address as an argument'); | |
process.exit(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
// ==UserScript== | |
// @name Expandrive Sales Killer | |
// @version 0.1 | |
// @description Auto Closes the new Pop generated by Expandrive | |
// @author SmugZombie | |
// @match https://www.expandrive.com/desktop/buy/ | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=expandrive.com | |
// @grant none | |
// ==/UserScript== |
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
const fs = require('fs'); | |
fs.readFile('path/to/your/har/file.har', 'utf8', (err, data) => { | |
if (err) throw err; | |
let har; | |
try { | |
har = JSON.parse(data); | |
} catch (e) { | |
console.error('Error parsing the input file as JSON:', e.message); |
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 Jira - External Links Fixer | |
// @namespace https://github.com/smugzombie | |
// @version 0.1.0 | |
// @description Jira is dumb and opens all links in the same tab as the issue you are viewing.. causing you to lose the issue. This forces external links to open seperately | |
// @author SmugZombie (github.com/smugzombie | |
// @match https://*.atlassian.net/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net | |
// @grant none | |
// @downloadURL https://put.wtf/media/scripts/JiraLinks.js?version=0.1.0 |
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 toISO(date) { | |
// If the date is already an ISO string, return it as-is | |
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(date)) { | |
return date; | |
} | |
// If the date is a number, assume it's a timestamp and convert it to a Date object | |
if (typeof date === 'number') { | |
date = new Date(date); | |
} |
NewerOlder