This file contains hidden or 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 os | |
import sys | |
import bencodepy | |
import humanize | |
import argparse | |
def total_size_files_torrent(file_name): | |
try: | |
parsed = bencodepy.decode_from_file(file_name) | |
except bencodepy.exceptions.DecodingError as e: |
This file contains hidden or 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 json | |
file_path = "/usr/share/vscodium-bin/resources/app/product.json" | |
with open(file_path, "r") as f: | |
config = json.load(f) | |
config["extensionsGallery"]["serviceUrl"] = "https://marketplace.visualstudio.com/_apis/public/gallery" | |
config["extensionsGallery"]["cacheUrl"] = "https://vscode.blob.core.windows.net/gallery/index" | |
config["extensionsGallery"]["itemUrl"] = "https://marketplace.visualstudio.com/items" |
This file contains hidden or 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
<?php | |
/* | |
Plugin Name: wordpress assist clean header | |
Plugin URI: http://www.wordpressassist.nl/ | |
Description: Remove shortlink hook | |
Version: 1.0 | |
Author: AukeJomm | |
Author URI: http://www.aukejongbloed.nl | |
*/ | |
This is a guide on how to send a properly formatted multipart email. Multipart email strings are MIME encoded, raw text email templates. This method of structuring an email allows for multiple versions of the same email to support different email clients.
// Example Multipart Email:
From: [email protected]
To: [email protected]
Subject: Multipart Email Example
Content-Type: multipart/alternative; boundary="boundary-string"
This file contains hidden or 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/sh | |
BIN=shadowsocks | |
RUN_D=/var/run | |
ss_local_PID_FILE=$RUN_D/ss-local.pid | |
ss_redir_PID_FILE=$RUN_D/ss-redir.pid | |
ipset_blacklist="/opt/etc/ipset/blacklist" | |
ipset_whitelist="/opt/etc/ipset/whitelist" | |
file="/opt/etc/config/shadowsocks" | |
COND=$1 |
This file contains hidden or 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
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' |