Skip to content

Instantly share code, notes, and snippets.

View ChrisCarini's full-sized avatar

Chris Carini ChrisCarini

View GitHub Profile
@ChrisCarini
ChrisCarini / Trivia of the Day - 2024-05-05
Last active May 5, 2024 01:51
Trivia of the Day - 2024-05-05
❓ How long is an IPv6 address?
1️⃣ 32 bits
2️⃣ 64 bits
3️⃣ 128 bytes
4️⃣ 128 bits
@ChrisCarini
ChrisCarini / Shodan.io Port Usage - US
Last active May 5, 2024 01:05
Shodan.io Port Usage - US
Port 80 │ █████████████████████████████ │ 43440074
Port 443 │ ███████████████████████████▎░ │ 40839199
Port 7547 │ ██████▎░░░░░░░░░░░░░░░░░░░░░░ │ 9449613
Port 22 │ ████▉░░░░░░░░░░░░░░░░░░░░░░░░ │ 7331386
Port 4567 │ ███▌░░░░░░░░░░░░░░░░░░░░░░░░░ │ 5421657
Port 161 │ ██▎░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 3446649
Port 8080 │ █▋░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2603440
Port 21 │ █▍░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2222987
Port 53 │ █▍░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2184554
Port 8443 │ █▍░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2098525
// For the blog post associated with this snippet, see: https://blog.chriscarini.com/2021/02/extract-urls-from-android-phone-chrome.html
var tabsNodes = document.querySelectorAll('.browser>.list.pages>.row')
var tabsAsText = Array.from(tabsNodes).map((t) => "- [" + t.querySelector(".name").innerText + "](" + t.querySelector(".url").innerText + ")")
copy(tabsAsText.join("\n"))
@ChrisCarini
ChrisCarini / original.js
Created January 9, 2019 04:34
Asus_router_configuration_js_error
function isPortConflict(_val) {
if (_val == '80')
return "This port is for HTTP LAN port.";
else if (_val == '')
return "This port is for Download Master.";
else if (_val == '8082')
return "This port is for Cloud Disk.";
else if (_val == '443')
return "This port is for Cloud Disk.";
else
@ChrisCarini
ChrisCarini / badblocks_command_for_existing_drive.sh
Created December 5, 2018 03:09
Hard drive testing / break-in process commands
sudo badblocks -nvs -o ~/badblocks${DEVICE_TO_TEST//\//_}.txt -b 4096 ${DEVICE_TO_TEST}
@ChrisCarini
ChrisCarini / JetBrainsFloatingLicenseServerAlerter.py
Last active November 8, 2018 00:18
A simple script to send an email when the JetBrains Floating License Server exceeds a given threshold.
#!/usr/bin/python
import sys
import requests
import datetime
import smtplib
from email.mime.text import MIMEText
##
# Configuration Values
##
package com.chriscarini.examples;
import java.util.Date;
public class ToStringExample {
private String name;
private int length;
private Date startDate;
private Object ref;
# Device Mountpoint FStype Options Dump Pass#
/dev/ada0s1a / ufs rw 1 1
/dev/ada0s1b none swap sw 0 0
Trying to mount root from ufs:/dev/ad4s1a [rw]...
mountroot: waiting for device /dev/ad4s1a...
Mounting from ufs: /dev/ad4s1a failed with error 19.
Loader variables:
vfs.root.mountfrom=ufs:/dev/ad4s1a
vfs.root.mountfrom.options=rw
Manual root filesystem specification:
<fstype>:<device> [options]
# Device Mountpoint FStype Options Dump Pass#
/dev/ad4s1a / ufs rw 1 1
/dev/ad4s1b none swap sw 0 0