This code has been moved to a GitHub repository with the corresponding license. https://github.com/UngarMax/TelnetServer
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
#!/usr/local/bin/python | |
import sys | |
import requests | |
from bs4 import BeautifulSoup | |
import json | |
def get_data_object(url) -> dict | None: | |
try: | |
# Fetch HTML content from the URL |
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
-- Prompt user to choose a file | |
set theFile to choose file with prompt "Select your file:" | |
-- Create a temporary path with .html extension | |
set filePath to POSIX path of theFile | |
set tempFilePath to filePath & ".temp.html" | |
-- Copy the original file to the temporary path | |
do shell script "cp " & quoted form of filePath & " " & quoted form of tempFilePath |
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
public function getBarcode($code, $type, $widthFactor = 2, $totalHeight = 30, $color = array(0, 0, 0)) | |
{ | |
$barcodeData = $this->getBarcodeData($code, $type); | |
// calculate image size | |
$width = ($barcodeData['maxWidth'] * $widthFactor); | |
$height = $totalHeight; | |
if (function_exists('imagecreate')) { | |
// GD library |