Skip to content

Instantly share code, notes, and snippets.

View Sharuru's full-sized avatar

Sharuru Sharuru

  • Shanghai, China
View GitHub Profile
@Sharuru
Sharuru / job.ps1
Created July 11, 2020 08:16
Concatenate MIJIA camera recordings and making a motion video as well
# This script should work with Powershell 7.
# It will take about 25 minutes to finish the whole job.
# You should place the ffmpeg.exe under the same folder.
# Also, create a folder named as 'image' is required.
if (!(Test-Path "ffmpeg.exe")) {
Write-Output "ffmpeg.exe is NOT FOUND, exiting..."
throw "ffmpeg.exe is not found in the current working directory."
}
if (Test-Path "output.mp4")
{
@Sharuru
Sharuru / Merging a WPF application into a single EXE
Created February 12, 2015 16:41
Merging a WPF application into a single EXE
第一步,找到项目文件下的 .csprojc 文件,用文本编辑器打开它,并找到下面这行:
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
把下面的 XML 粘贴到文件中,然后保存并在 Visual Studio 中重载:
<Target Name="AfterResolveReferences">
<ItemGroup>
<EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll'">
<LogicalName>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</LogicalName>
</EmbeddedResource>
</ItemGroup>