Skip to content

Instantly share code, notes, and snippets.

View binary2010's full-sized avatar

binary2010 binary2010

View GitHub Profile
@bitaller
bitaller / Disabling Windows 10-11 Update.md
Created December 15, 2022 07:14
Disabling Windows 10-11 Update

if you just want to stop the automatic-update but you still want to be able to install updates yourself by launching the Windows update manually, you just need to apply a group-policy: run: gpedit.msc, computer configuration, administrative templates, windows components, windows update, configure automatic updates - set to disabled.

01_start_run_gpedit_msc_group_policy

02_group_policy_windowsupdate_configureautomaticupdates_disabled_noautoupdate

or apply:

@Youngv
Youngv / WSL2.bat
Last active February 21, 2025 14:32
给 WSL2 和 Host 设置静态 IP 地址,每次重启 Host 或 WSL2 后运行
@ECHO OFF
wsl -d Ubuntu-20.04 -u root ip addr del $(ip addr show eth0 ^| grep 'inet\b' ^| awk '{print $2}' ^| head -n 1) dev eth0
wsl -d Ubuntu-20.04 -u root ip addr add 192.168.50.2/24 broadcast 192.168.50.255 dev eth0
wsl -d Ubuntu-20.04 -u root ip route add 0.0.0.0/0 via 192.168.50.1 dev eth0
wsl -d Ubuntu-20.04 -u root echo nameserver 192.168.50.1 ^> /etc/resolv.conf
powershell -c "Get-NetAdapter 'vEthernet (WSL)' | Get-NetIPAddress | Remove-NetIPAddress -Confirm:$False; New-NetIPAddress -IPAddress 192.168.50.1 -PrefixLength 24 -InterfaceAlias 'vEthernet (WSL)'; Get-NetNat | ? Name -Eq WSLNat | Remove-NetNat -Confirm:$False; New-NetNat -Name WSLNat -InternalIPInterfaceAddressPrefix 192.168.50.0/24;"
@zsoumya
zsoumya / bc4trialreset.cmd
Created July 12, 2019 21:25
Beyond Compare 4 Trial Reset
reg delete "HKCU\Software\Scooter Software\Beyond Compare 4" /v CacheID /f
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 9, 2025 07:02
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@lindexi
lindexi / Parse solution
Last active January 21, 2019 15:19
获得 .sln 所有项目。 Parse .sln to projects with FullName
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
namespace lindexi.wpf.Solution
{
public class Solution
@JonCole
JonCole / Redis-BestPractices-General.md
Last active March 13, 2025 14:30
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

storage:
dbPath: "/data/db"
journal:
enabled: true
systemLog:
destination: file
path: "/var/log/mongodb.log"
logAppend: true
timeStampFormat: iso8601-utc
processManagement:
@leftclickben
leftclickben / gist:322b7a3042cbe97ed2af
Last active June 7, 2023 10:58
Steps to migrate from SVN to GitLab

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

Setup

  • SVN is hosted at svn.domain.com.au.
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at git.domain.com.au and:
@gsherman
gsherman / gist:6313531
Created August 22, 2013 22:19
log4net appender - writes to oracle database using oracle client
<appender name="oracle" type="log4net.Appender.AdoNetAppender">
<connectionString value="data source=AM6o11;User ID=sa;Password=sa" />
<connectionType value="Oracle.DataAccess.Client.OracleConnection, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342" />
<commandText value="INSERT INTO Log (Datetime,Thread,Log_Level,Logger,Message) VALUES (:log_date, :thread, :log_level, :logger, :message)" />
<bufferSize value="1" />
<parameter>
<parameterName value=":log_date" />
<dbType value="DateTime" />
<layout type="log4net.Layout.RawTimeStampLayout" />
</parameter>
@binjoo
binjoo / Amount2RMB.java
Created July 18, 2013 10:15
JAVA:字符串金额转成中文大写
/*
* Amount2RMB.java 2008-6-15
*/
package test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Amount2RMB {
private static final Pattern AMOUNT_PATTERN =