Skip to content

Instantly share code, notes, and snippets.

@bitbybit
bitbybit / dnsbl-check.php
Created June 10, 2013 12:22
DNSBL IP checking
<?
$email = 'your@email';
$dnsbl_check = array(
"bl.spamcop.net",
"list.dsbl.org",
"sbl.spamhaus.org",
"xbl.spamhaus.org",
"cbl.abuseat.org",
"zen.spamhaus.org",
@bitbybit
bitbybit / barcode-country.js
Created June 17, 2013 14:34
Barcode country detection. Returns country code in ISO 3166-2 from barcode.
// https://github.com/Dremora/barcode-lookup/blob/gh-pages/barcode.js
var barcode_country = function (code) {
code = parseInt(code.substr(0, 3), 10);
if ((0 <= code && code <= 19)) {
return 'US,CA';
} /*else if ((20 <= code && code <= 29)) {
return 'Restricted distribution (MO defined)';
}*/ else if ((30 <= code && code <= 39)) {
return 'US';
@bitbybit
bitbybit / temp-email.txt
Last active June 20, 2026 23:01
List of temporary email services
00jac.com
0411cs.com
045692.xyz
062e.com
0731tz.com
08058383859.com
0815.ru
0815.su
0box.eu
0cd.cn
@bitbybit
bitbybit / xorg.conf
Created March 25, 2018 00:08
NVIDIA GeForce FX 5200 and NEC LCD1701 (1280×1024)
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
Option "DDC" "False"
DisplaySize 338 271
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
Modeline "1280x1024_60" 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
EndSection
const cloudflareIpURLv4 = 'https://www.cloudflare.com/ips-v4'
const cloudflareIpURLv6 = 'https://www.cloudflare.com/ips-v6'
addEventListener('fetch', (event) => {
return event.respondWith(handleRequest())
})
/**
*
* @param url
@bitbybit
bitbybit / README.md
Created January 16, 2025 16:15
How to import history from Orion Browser by Kagi to any other browser

While Orion does not provide a direct way to export history entries, it is possible to manually copy them from the "Show History" window. To do this, expand the date groups, select all the lines, and copy them. The output will look like this:

2024-01-16 00:00:00 Orion Browser by Kagi https://kagi.com/orion

You can paste this output into a plain text file to proceed with the next steps.

Firefox has an add-on called History-Export that enables history export and import. To use it with Orion's history, you need to convert the copied entries into a format supported by this add-on. Update the variables pathToHistoryFile and pathToNewImportFile in the provided script, then run:

tsc && node ./dist/index.js

@bitbybit
bitbybit / code.js
Created May 24, 2026 14:24
Removing yourself from every repository where you are a collaborator on GitHub
// Run this in the browser console on the https://github.com/settings/repositories page
(async function massLeaveRepos() {
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
// Helper 1: Waits for element to exist AND enter the viewport
const waitForVisible = (selector) => {
return new Promise((resolve) => {
// First, wait for the element to actually exist in the DOM
const checkExist = setInterval(() => {
@bitbybit
bitbybit / README.md
Created July 9, 2026 20:53
Convert Sofa export into the Listy JSON format

Before running the script, initialize a project and install the required dependencies:

npm init -y
npm install csv-parse
npm install -D typescript tsx @types/node

convert.ts should be placed in the same directory as items.csv