Skip to content

Instantly share code, notes, and snippets.

@zhaojunmeng
zhaojunmeng / Setup_Slim.bat
Last active July 11, 2024 12:20
Call Setup.bat in Unreal Engine Source, add multithread, local download cache and exclude list
@REM You can use --dry-run to just print what will be downloaded.
@REM You can use --cache to specify a custom path for the download cache.
@REM call Setup.bat --dry-run --threads=%NUMBER_OF_PROCESSORS% --cache=C:\Code\Cache\ue-gitdeps ^
call Setup.bat --threads=%NUMBER_OF_PROCESSORS% --cache=C:\Code\Cache\ue-gitdeps ^
--exclude=HoloLens ^
--exclude=Linux ^
--exclude=linux-64 ^
--exclude=linux32 ^
--exclude=linux64 ^
@ms-fadaei
ms-fadaei / v8-help.md
Last active December 30, 2023 08:56
V8 JavaScript engine options and flags v9.9.47

If you want to run V8 on your local machine, please use jsvu

interpreters/compilers

  • Ignition: V8 features an interpreter called Ignition. Ignition is optimized to make code run as soon as possible. Ignition converts js code to bytecode
  • Liftoff: V8 has a streaming Wasm compiler called Liftoff which, like Ignition, is geared to get your code running quickly, at the cost of generating potentially suboptimal execution speed.
  • Sparkplug: Sparkplug takes Ignition’s output (the infamous “bytecode”) and turns it into non-optimized machine code, yielding better performance at the cost of increased memory footprint.
  • TurboFan: TurboFan is one of V8’s optimizing compilers leveraging a concept called “Sea of Nodes”. Once sufficient data has been collected, TurboFan kicks in and generates low-level machine code that
@bohdon
bohdon / MyProject-GetConfigValue.Build.cs
Last active August 30, 2022 03:57
read a config value in a UE4 ModuleRules
/// <summary>
/// Get a value from a config file for the project of the current target
/// </summary>
/// <returns>true if a value was found for the given section and key</returns>
bool TryGetConfigValue(ConfigHierarchyType ConfigType, string SectionName, string KeyName, out string Value)
{
ConfigHierarchy Config = ConfigCache.ReadHierarchy(ConfigType, DirectoryReference.FromFile(Target.ProjectFile), Target.Platform);
if (Config != null)
{
ConfigHierarchySection Section = Config.FindSection(SectionName);
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active July 26, 2024 08:06
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@TouiSoraHe
TouiSoraHe / DownloadHandlerFileRange
Last active July 3, 2024 02:03
UnityWebRequest实现断点续传下载
using UnityEngine.Networking;
using System.IO;
using System;
/// <summary>
/// 使用方式:
/// UnityWebRequest unityWebRequest = new UnityWebRequest("url");
/// unityWebRequest.downloadHandler = new DownloadHandlerFileRange("文件保存的路径", unityWebRequest);
/// unityWebRequest.SendWebRequest();
/// </summary>
@ngot
ngot / multi-thread.js
Last active October 25, 2023 15:27
V8 Thread Demo
start(() => {
while(true)
{
print("a");
sleep(1000);
}
})
while(true)
{
@bmanGH
bmanGH / SpriteTextureSliceExporter.cs
Last active March 8, 2022 12:48
Unity editor script for export sprite sheet from Unity to Cocos2d or PNG files
/**
* script for export sprite sheet from Unity to Cocos2d
*
* @author bman (zx123xz321hm3@hotmail.com)
* @version 1.0 1/3/2014
* @version 1.1 6/9/2014 add image slice exporter
*/
using UnityEngine;
using UnityEditor;
@uhziel
uhziel / pre-commit.sh
Created April 8, 2013 07:28
Subversion server pre-commit hook for Unity3D .meta file. 约束 Assets 目录下添加、删除、移动、改名文件或目录时,必须要携带对应 .meta 文件。 如果提交的 log 中包含"The Shawshank Redemption",可以逃避此规则。
#!/bin/bash
REPOS="$1"
TXN="$2"
SVNLOOK=svnlook
MAGICWORD='The Shawshank Redemption'
# Magic Word: The Shawshank Redemption.
# via http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-repository-hooks.html