本脚本会扫描当前目录下的 JPG/HEIF 照片,根据 EXIF 信息将它们分类到不同的目录:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
setlocal enabledelayedexpansion

:: 设置支持的图片扩展名
set "extensions=.jpg .jpeg .heif .heic"

:: 创建必要的目录
if not exist "Clouds" mkdir "Clouds"
if not exist "Unknown" mkdir "Unknown"

:: 遍历当前目录下的所有图片文件
for %%f in (*) do (
set "file=%%f"
set "extension=%%~xf"

:: 检查文件扩展名是否在支持的列表中
echo %extensions% | find /i "!extension!" > nul
if !errorlevel! equ 0 (
echo 处理文件: !file!

:: 使用 PowerShell 获取 EXIF 信息
for /f "delims=" %%a in ('powershell -command "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; MATHJAX-SSR-0folder = MATHJAX-SSR-1file = MATHJAX-SSR-2comment = MATHJAX-SSR-3file, 24); MATHJAX-SSR-4folder.GetDetailsOf(MATHJAX-SSR-5cameraModel = MATHJAX-SSR-6comment) { 'Clouds' } elseif (-not MATHJAX-SSR-7cameraModel -eq '') { 'Unknown' } else { $cameraModel }"') do (
set "target_dir=%%a"
)

:: 清理目录名中的非法字符
set "clean_dir=!target_dir!"
set "clean_dir=!clean_dir:\=!"
set "clean_dir=!clean_dir:/=!"
set "clean_dir=!clean_dir::=!"
set "clean_dir=!clean_dir:?=!"
set "clean_dir=!clean_dir:"=!"
set "clean_dir=!clean_dir:<=!"
set "clean_dir=!clean_dir:>=!"
set "clean_dir=!clean_dir:|=!"
set "clean_dir=!clean_dir: =_!"

:: 创建目标目录(如果不存在)
if not exist "!clean_dir!" mkdir "!clean_dir!"

:: 移动文件
echo 移动 "!file!" 到 "!clean_dir!\"
move "!file!" "!clean_dir!\" > nul
)
)

echo 文件分类完成!
pause
阅读全文 »

本文搬运自:https://www.aynakeya.com/articles/ctf/xi-ma-la-ya-xm-wen-jian-jie-mi-ni-xiang-fen-xi

前言

说点前言,但是我又不知道说啥了。

由于最近突然喜欢在做事情的时候开个有声小说,于是我就把喜马拉雅这个软件重新下载了下来,并小冲了一个会员。

我注意到喜马拉雅这个客户端同时具有下载的功能,小小的尝试了一下,发现下载下来的文件为.xm文件格式。这个格式属于一种加密的格式,除了喜马拉雅客户端之外都不能播放。

什么,加密的?这怎么能忍。

仅限于学习交流使用,本文作者不负任何其他责任

Disclaimer: Only used for educational purpose.

动态分析

Electron自带的参数可以很好的帮助我们对electron程序进行动态分析。

electron在运行的时候一般会有两个process。一个为main process,另外一个为render process

在调试这个程序的时候,主要需要调试的main process。 所以我们可以加上--enable-logging来显示main process中console.log的内容。

同时,我们也可以用--inspect=9000 + chrome v8 debugger 的方式进行调试。

阅读全文 »

Manual installs

Operating systems

Name Download URL
Windows https://download.unity3d.com/download_unity/7670c08855a9/Windows64EditorInstaller/UnitySetup64-2022.3.62f2.exe
macOS https://download.unity3d.com/download_unity/7670c08855a9/MacEditorInstaller/Unity-2022.3.62f2.pkg
macOS ARM64 https://download.unity3d.com/download_unity/7670c08855a9/MacEditorInstallerArm64/Unity-2022.3.62f2.pkg
Linux https://download.unity3d.com/download_unity/7670c08855a9/LinuxEditorInstaller/Unity-2022.3.62f2.tar.xz

Other installs

阅读全文 »

Rich Text

Digital Native Studios

TextMesh Pro Documentation

From Rich Text, TextMesh Pro Documentation

You can use rich text tags to alter the appearance and layout of your text. These tags work like HTML or XML tags, but have less strict syntax.

A tag looks like <tag>. Many tags operate on a scope, which you can end with </tag>. Such scopes can be nested, and you don’t have to close them in the same order that you started them.

Some tags have values and attributes, like <tag=value> and <tag attribute=value>. These arguments are either names or numeric values. Numbers are either regular decimal numbers, pixels like 1px, percentages like 80%, font units like 1.2em, or hexadecimal color values like #FF. Names can be either with or without double quotes, but if there are more attributes, it’s best to use quotes.

Tags plus their attributes can be up to 128 characters long. This limitation shouldn’t be an issue, unless you’re using very long string attributes.

Tag Overview

Tags Summary
align Text alignment.
alpha, color Color and opacity.
b, i Bold and italic style.
cspace Character spacing.
font Font and material selection.
indent Indentation.
line-height Line height.
line-indent Line indentation.
link Text metadata.
lowercase, uppercase, smallcaps Capitalization.
margin Text margins.
mark Marking text.
mspace Monospacing.
noparse Prevent parsing.
nobr Non-breaking spaces.
page Page break.
pos Horizontal caret position.
size Font size.
space Horizontal space.
sprite Insert sprites.
s, u Strikethrough and underline.
style Custom styles.
sub, sup Subscript and superscript.
voffset Baseline offset.
width Text width.
阅读全文 »

adb 命令

  • adb devices
    列出当前链接adb的设备

    1
    2
    3
    $ adb devices
    List of devices attached
    emulator-5558 device
  • adb pair {ip}:{port}
    配对指定ip和端口的adb设备,使用connect前需要先执行pair
    手机端需要打开 开发者选项 / 无线调试 / 使用配对码配对设备

    1
    2
    3
    $ adb pair 172.16.12.140:38617
    Enter pairing code: ******
    Successfully paired to 172.16.12.140:38617 [guid=adb-********-******]
  • adb connect {ip}:{port}
    连接指定ip和端口的adb设备

    1
    2
    $ adb connect 172.16.12.140:43357
    connected to 172.16.12.140:43357
  • adb disconnect
    断开所有连接adb的设备

    1
    2
    $ adb disconnect
    disconnected everything
阅读全文 »

本方法参考 Uni-HubHacker 仓库(已和谐)

1. 原理说明

由于Unity Hub使用的是electron框架,所以其部分运行时js代码会存放在app.asar文件中。由于Unity Hub未对app.asar文件进行加密切未对其进行hash校验(但疑似会对文件大小校验),所以可以修改app.asar文件中登陆相关的代码,从而跳过登陆验证。由于.asar文件是归档文件,所以需要使用二进制工具打开,直接对代码进行明文修改。

阅读全文 »

Singleton

From Singleton - Unify Community Wiki (archive.org)

[TOC]

Alternatives

Scriptable Objects

One excellent alternative to the singleton pattern in Unity is the use of ScriptableObjects as a type of global variable. Ryan Hipple from Schell Games gave a presentation at Unite Austin 2017 titled Game Architecture with Scriptable Objects that explains how to implement them and the many advantages over singletons.

Toolbox

The “Toolbox“ concept improves upon the singleton pattern further by offering a different approach that makes them more modular and improves testability.

阅读全文 »

本文参考:Aseprite终极白嫖教程

0. 前言

  叠甲:以下会有一大段介绍(其实就是废话时间)。如果前期准备都完成了,想直接看编译指南的话可以跳转到编译部分,本文仅包含Windows的编译(别问,问就是买不起Mac)。

aseprite-logo

Aseprite是一种专有的,源可用的图像编辑器,主要用于像素画图和动画。它可以在Windows,macOS和Linux上运行,并具有用于图像和动画编辑的不同工具,例如图层,框架,tilemap支持,命令行界面,Lua脚本等。
原文来自:Aseprite 维基百科

  • 使用Aseprite可以更便捷的做出像素风格的图片及Gif

aseprite-icon

阅读全文 »

转自:https://www.cgspread.com/3551.html
原作者:weijer
原标题:【叠加模式】Photoshop图层混合模式的计算公式
本文经过重新排版,仅供学习参考,严谨商用

  PS和Nuke的叠加模式计算算法相差甚远,最近想在Nuke中模拟ps叠加模式。老外已经有个gizmo了么免费的功能少,得付费购买,先百度找了下PS的图层混合模式的计算公式收藏慢慢想想怎么在Nuke中实现最好。

psnuke1

原图

阅读全文 »

Unity中Shader表面着色器基础

Unity云中客

2016.04.17 22:01
转载:http://www.jianshu.com/p/b17503c056de

写与灯光交互的Shader是很复杂的,因为有不同的灯光类型(light Type),不同的阴影选项(Shadow Options),不同的渲染路径(renderingPath:forward,deferred rendering),所以Shader应该以某种方式来处理所有的复杂情况。

Unity中的==Surface Shaders==是一种比使用底层的顶点/像素着色器程序(vertex/pixel shader programs)写起来更为简单通用的方式。 surfaceShaders 也是用Cg/hlsl来写。

阅读全文 »
0%