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
# Created by .ignore support plugin (hsz.mobi) | |
### Python template | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
setopt no_nomatch | |
export TERM="xterm-256color" | |
ZSH_TIME='24' | |
eval "$(thefuck --alias fuck)" |
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
javascript: (function () { function h(html) { return html.replace(/<p>/g, '\n\n').replace(/<\/p>/g, '').replace(/<b>/g, '**').replace(/<\/b>/g, '**').replace(/<i>/g, '_').replace(/<\/i>/g, '_').replace(/<code[^>]*>/g, (match) => { const lm = match.match(/class="[^"]*language-([^"]*)"/); return lm ? '\n```' + lm[1] + '\n' : '```'; }).replace(/<\/code[^>]*>/g, '```').replace(/<[^>]*>/g, '').replace(/Copy code/g, '').replace(/This content may violate our content policy. If you believe this to be in error, please submit your feedback — your input will aid our research in this area./g, '').trim(); } (() => { const e = document.querySelectorAll(".text-base"); let t = ""; for (const s of e) s.querySelector(".whitespace-pre-wrap") && (t += `**${s.querySelector('img') ? 'You' : 'ChatGPT'}**: ${h(s.querySelector(".whitespace-pre-wrap").innerHTML)}\n\n`); const now = new Date(); const formattedTime = now.getFullYear().toString() + (now.getMonth() + 1).toString().padStart(2, '0') + now.getDate().toString().padStart(2, '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
import re | |
def extract_domain_name(url): | |
""" | |
Given a URL string, returns the domain name without the TLD (top-level domain), | |
or an empty string if the input is invalid. | |
""" | |
if not isinstance(url, str): | |
return "" | |
url = url.strip().lower() |
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
127.0.0.1 xmindchina.net | |
127.0.0.1 www.xmindchina.net | |
127.0.0.1 www.ntfsformac.cc | |
127.0.0.1 www.makeding.com | |
127.0.0.1 makeding.com | |
127.0.0.1 vm.makeding.com | |
127.0.0.1 www.bingdianhuanyuan.cn | |
127.0.0.1 xia.bingdianhuanyuan.cn | |
127.0.0.1 bingdianhuanyuan.cn | |
127.0.0.1 huishenghuiying.com.cn |
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
package main | |
// search all sub slices | |
func SearchSubSlice(mainSlice, subSlice []byte) []int { | |
var result []int | |
result = nil | |
// 主切片为空,直接返回 nil | |
// if main slice is nil or empty, just return nil | |
if mainSlice == nil { |
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
# coding: utf-8 | |
__author__ = 'Jux.Liu' | |
import os | |
from subprocess import Popen | |
from time import sleep | |
cmd_new_file_multiline = 'base64 /dev/urandom 2>>/dev/null | head -c {filesize} > ./{size}{unit}_{file_no} && echo "" >> ./{size}{unit}_{file_no}' | |
cmd_new_file_one_line = 'tr -dc A-Za-z0-9 </dev/urandom 2>>/dev/null | head -c {filesize} > ./{size}{unit} && echo "" >> ./{size}{unit}' | |
cmd_one_file_multiline = 'base64 /dev/urandom 2>>/dev/null | head -c {filesize} >> ./{size}{unit}_{file_no} && echo "" >> ./{size}{unit}_{file_no}' |
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
# coding: utf-8 | |
__author__ = 'Jux.Liu' | |
# (folder, blueprint, prefix) | |
INSTALLED_MODULES = [ | |
('routes', 'main', '/'), | |
('api', 'api', '/api'), | |
('routes', 'store', '/') | |
] |
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
# coding: utf-8 | |
__author__ = 'Jux.Liu' | |
import termios | |
import sys, tty | |
def getch(): | |
def _getch(): | |
fd = sys.stdin.fileno() |
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
javascript:getEventListeners(document).copy.forEach(({listener}) => document.removeEventListener('copy', listener)) |
NewerOlder