Skip to content

Instantly share code, notes, and snippets.

View luojunyuan's full-sized avatar
🏠
have a good day

k1mlka luojunyuan

🏠
have a good day
  • BeyondDimension
  • Guizhou,China
View GitHub Profile
@luojunyuan
luojunyuan / brightness.cpp
Last active September 18, 2021 05:50
adjust laptop brightness
// From https://blog.csdn.net/ONE_SIX_MIX/article/details/80286421
#include <iostream>
#include <string>
#include <windows.h>
#include <objbase.h>
#include <wbemidl.h>
#include <comdef.h>
#include <mutex>
@luojunyuan
luojunyuan / bash
Created September 14, 2021 08:48
Rename branch github tips
git branch -m reactiveUI main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
炙雪@严禁任何形式的转载
yhsxsx10月
白灵凛音
yuppi4672
sakura1313
acghmoe.com
百元君
ZODGAME
@luojunyuan
luojunyuan / toast.cs
Last active May 18, 2021 15:44
toast
// Fine System.Runtime.InteropServices.COMException when toast first time
//using Windows.UI.Notifications;
new ToastContentBuilder()
.AddText("ErogeHelper is running!")
.Show(toast =>
{
toast.Group = "eh";
toast.Tag = "eh";
// TODO: Add Kill ErogeHelper immediately
@luojunyuan
luojunyuan / regexp
Created January 12, 2021 15:55
Count your xaml and csharp file line in Visual Studio
^b*[^:b#/]+.*$
@luojunyuan
luojunyuan / deduplicate.cs
Created October 12, 2020 15:18
CSharp AABB deduplicate
case "AABB":
patten = $@"([^\\]){{{gameInfo.RepeatTime}}}";
regex = new Regex(patten);
matches = regex.Matches(hp.Text);
if (matches.Count != 0)
{
string tmp = "";
foreach (Match match in matches)
{
@luojunyuan
luojunyuan / delete_arrow(Run in Admin).bat
Created October 1, 2020 15:57
Delete windows shortcut arrow icon
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "%systemroot%\system32\imageres.dll,197" /t reg_sz /f
taskkill /f /im explorer.exe
attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db"
del "%userprofile%\AppData\Local\iconcache.db" /f /q
start explorer
pause
@luojunyuan
luojunyuan / tfrecord.py
Last active April 15, 2019 17:08
tfrecord.py
import os
import tensorflow as tf
import numpy as np
import time
os.environ["TF_CPP_MIN_LOG_LEVEL"]='2' # 只显示 warning 和 Error
def _int64_feature(value):