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 Foundation | |
import ImageIO | |
func modifyAndSaveHEICPhoto(atPath path: String, assetIdentifier: String) { | |
let imageSource = CGImageSourceCreateWithURL(URL(fileURLWithPath: path) as CFURL, nil) | |
let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSource!, 0, nil) as? [CFString: Any] | |
var modifiedProperties = imageProperties! | |
var appleMakerDict = modifiedProperties[kCGImagePropertyMakerAppleDictionary] as? [CFString: Any] | |
appleMakerDict?["17" as CFString] = assetIdentifier | |
modifiedProperties[kCGImagePropertyMakerAppleDictionary] = appleMakerDict |
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
use tao::menu::{MenuId, MenuItem, MenuItemAttributes}; | |
use wry::{ | |
application::{ | |
event::{Event, StartCause, WindowEvent}, | |
event_loop::{ControlFlow, EventLoop}, | |
menu::MenuBar, | |
window::WindowBuilder, | |
}, | |
webview, |
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
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.chrome.service import Service | |
# Chrome Service with driver | |
CHROMEDRIVER_PATH = '/usr/bin/chromedriver' | |
service = Service(CHROMEDRIVER_PATH) | |
# Chrome Options with headless | |
options = Options() |
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
// ==UserScript== | |
// @name Fancy Maillist | |
// @namespace http://shiwx.org/ | |
// @version 0.1 | |
// @description make linux maillist easy-to-read. | |
// @author SHI Wenxuan | |
// @match https://lore.kernel.org/* | |
// @resource tailwindCSS https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css | |
// @require https://code.jquery.com/jquery-3.6.0.min.js | |
// @icon https://www.google.com/s2/favicons?domain=kernel.org |
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
# use mirror | |
apt update | |
apt install git python3 python3-apt | |
# arm reference platform dependencies | |
apt install acpica-tools autoconf bc bison bridge-utils build-essential curl device-tree-compiler expect flex g++-multilib gcc-multilib genext2fs gperf libc6 libssl-dev libstdc++6 libncurses5 libxml2 libxml2-dev libxml2-utils libxml-libxml-perl make openssh-server openssh-client uuid-dev automake android-tools-adb android-tools-fastboot cython kernelshark libfreetype6-dev libpng-dev libtool net-tools nmap openjdk-8-jdk pkg-config python-dev python-mako python-nose python-numpy screen sshpass trace-cmd tree autoconf doxygen fuseext2 locales mtools wget zip zlib1g zlib1g-dev | |
# python | |
pip install PyCryptodome | |
apt install python3-pyelftools | |
pip2 install IPython bart-py devlib jupyter pandas pexpect psutil pyserial trappy | |
# git |