Skip to content

Instantly share code, notes, and snippets.

@tripleee
tripleee / Unicode_KrutiDev_converter.py
Last active March 25, 2025 08:49
Python3 version of Unicode <=> KrutiDev converter
# KrutiDev to Unicode function
def KrutiDev_to_Unicode(krutidev_substring):
modified_substring = krutidev_substring
array_one = ["ñ","Q+Z","sas","aa",")Z","ZZ","‘","’","“","”",
"å", "ƒ", "„", "…", "†", "‡", "ˆ", "‰", "Š", "‹",
"¶+", "d+", "[+k","[+", "x+", "T+", "t+", "M+", "<+", "Q+", ";+", "j+", "u+",
@tripleee
tripleee / KrutidevToUnicode3.py
Created July 2, 2021 08:40
Python3 version of KrutidevToUnicode.py
# KrutidevToUnicode
# coding=utf-8
class KrutidevToUnicode:
CHARS_KD = [
"ñ", "Q+Z", "sas", "aa", ")Z", "ZZ", "‘", "’", "“", "”",
"å", "ƒ", "„", "…", "†", "‡", "ˆ", "‰", "Š", "‹",
@tripleee
tripleee / openfoam7-exec
Last active June 30, 2021 03:53
Fork of openfoam7-macos for running a command in the container and exiting
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
# This program is free software: you can redistribute it and/or modify it
// ==UserScript==
// @name Reply to self
// @namespace https://github.com/dzaima
// @version 0.1
// @description reply to self
// @author dzaima
// @match https://chat.stackexchange.com/*
// @match https://chat.stackoverflow.com/*
// @match https://chat.meta.stackexchange.com/*
// @match https://chat.meta.stackoverflow.com/*
@tripleee
tripleee / rmhtml.py
Created February 9, 2021 11:51
Selectively remove text/html from multipart/alternative structures in email
from email import message_from_bytes
from email.iterators import typed_subpart_iterator, body_line_iterator
from email.policy import default
def nontrivial(textpart):
"""
Check that this part contains at least three lines of text.
"""
for idx, _ in enumerate(body_line_iterator(textpart)):
@tripleee
tripleee / xidel.txt
Created February 5, 2021 05:13
Output from //table[@id="arpa-table"]/tbody/tr/join((td[1],normalize-space(td[2]/text()),td[2]/span/a,td[2]/span/a/@href),x:cps(9))
xidel@debian$ curl -o arpa.html https://www.iana.org/domains/arpa
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10479 0 10479 0 0 10056 0 --:--:-- 0:00:01 --:--:-- 10056
xidel@debian$ xidel -s arpa.html -e '//table[@id="arpa-table"]/tbody/tr/join((td[1],normalize-space(td[2]/text()),td[2]/span/a,td[2]/span/a/@href),x:cps(9))'
arpa Reserved exclusively to support operationally-critical infrastructural identifier spaces as advised by the Internet Architecture Board RFC 3172 /go/rfc3172
as112.arpa For sinking DNS traffic for reverse IP address lookups and other applications RFC 7535 /go/rfc7535
e164.arpa For mapping E.164 numbers to Internet URIs RFC 6116 /go/rfc6116
home.arpa For non-unique use in residential home networks RFC 8375 /go/rfc8375
@tripleee
tripleee / debug.txt
Created March 25, 2020 05:24
PYENV_DEBUG=1 pip download pep8
$ PYENV_DEBUG=1 pip download pep8
+ program=pip
+ [[ pip = \p\y\t\h\o\n* ]]
+ export PYENV_ROOT=/Users/tripleee/.pyenv
+ PYENV_ROOT=/Users/tripleee/.pyenv
+ exec /usr/local/Cellar/pyenv/1.2.13/libexec/pyenv exec pip download pep8
+ [pyenv:22] enable -f /usr/local/Cellar/pyenv/1.2.13/libexec/../libexec/pyenv-realpath.dylib realpath
+ [pyenv:57] '[' -z /Users/tripleee/.pyenv ']'
+ [pyenv:60] PYENV_ROOT=/Users/tripleee/.pyenv
+ [pyenv:62] export PYENV_ROOT
@tripleee
tripleee / gist:490b62933c85650a464b64db43398055
Created December 29, 2019 17:18
Stretch Heirloom mailx transcript
root@0ea121f4b65b:/# /usr/bin/heirloom-mailx -v -S smtp=localhost -s "This is the subject
> Content-type: text/html" -r [email protected] [email protected] </etc/motd
Resolving host "localhost:smtp" ... failed
Lookup of "localhost:smtp" failed: Servname not supported for ai_socktype
Trying standard protocol port "25"
If that succeeds consider including the port in the URL!
done
Connecting to "127.0.0.1:25" ...
Connecting to "::1:25" ...Could not connect: Cannot assign requested address
"/root/dead.letter" 15/501
@tripleee
tripleee / godaddy.md
Created November 5, 2019 08:19
Chat with GoDaddy support 2019-11-05

Welcome! We are excited to offer you messaging, allowing you to respond to us in your own time. Click here to get started.

You at 9:46, Nov 5:
the results I get for ongraph.com simply say to visit the GoDaddy whois web service ... except that's exactly what I'm visiting. Where can I get the detailed whois info for this domain?

Godaddy Guide at 9:46, Nov 5:
Thanks! Select the best option, so we can find you the right Guide.
WordPress/Hosting
SSL Certification
Email

This is an attempt to discuss the following Stack Overflow post:

https://stackoverflow.com/a/57371477/874188

Here's a quote of the current version.

The only reason I could think of was this:

You can export aliases to easily change, say, the command prompt style from your terminal. >