Skip to content

Instantly share code, notes, and snippets.

{
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: LLVM }",
"[csharp]": {
"editor.formatOnType": true
},
"[dockercompose]": {
"editor.tabSize": 2
},
"[html]": {
"editor.tabSize": 2
@logchan
logchan / win10-tweaks.reg
Created December 24, 2022 19:06
Windows 10 Registry Tweaks
Windows Registry Editor Version 5.00
; Allow changing lock screen idle time in Advanced Power Options
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\7516b95f-f776-4464-8c53-06167f40cc99\8EC4B3A5-6868-48c2-BE75-4F3044BE88A7]
"Attributes"=dword:00000002
; Remove "3D Objects"
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}]
@logchan
logchan / Convert-LiveStreams.ps1
Last active May 30, 2021 20:23
Generate live_streams.sii from list of definitions.
# Convert-LiveStreams.ps1
# Place this file and live_streams.txt in your ETS2 document folder
# Put your streams in live_streams.txt, one each line, like (include the quotes!):
# "http://example.com/|Some Radio|Sim radio|CN|128|0"
# Lines starting with # are ignored, so you can switch them on/off
# Right-click this script and run with PowerShell, it will generate live_streams.sii
$ErrorActionPreference = "Stop";
@logchan
logchan / OriginalSize.cs
Created November 10, 2020 03:58
Vegas Pro script that fits a track event to the media's original size
// Vegas Pro script that fits a track event to the media's original size
// Background: when a media is added to a track, it is scaled to fit the project's video dimensions
// This script scales it back to its original size
// It works by changing the first frame of video motion
// If using Vegas Pro 14 or later, comment Sony.Vegas and uncomment ScriptPortal.Vegas
using Sony.Vegas;
// using ScriptPortal.Vegas;
public class EntryPoint {
@logchan
logchan / Install-RdpCert.ps1
Created July 31, 2019 14:36
Powershell script to install a PFX certificate and set it for RDP.
#Requires -RunAsAdministrator
param(
[Parameter(Mandatory=$true)]
[string]$Path
)
$ErrorActionPreference = 'Stop'
# Import certificate
@logchan
logchan / Remove-Move-To-OneDrive.ps1
Created February 24, 2019 16:41
Remove the "Move to OneDrive" context menu item permanently by clearing the values of the registry keys and denying access.
#Requires -RunAsAdministrator
New-PSDrive -Name HKCR_RMTO -PSProvider Registry -Root 'HKEY_CLASSES_ROOT'
pushd HKCR_RMTO:
$keys = '*\shellex\ContextMenuHandlers\ FileSyncEx', 'Directory\Background\shellex\ContextMenuHandlers\ FileSyncEx', 'Directory\shellex\ContextMenuHandlers\ FileSyncEx', 'IE.AssocFile.URL\shellex\ContextMenuHandlers\ FileSyncEx', 'lnkfile\shellex\ContextMenuHandlers\ FileSyncEx'
$rights = 'ChangePermissions', 'CreateSubKey', 'Delete', 'FullControl', 'SetValue', 'TakeOwnership', 'WriteKey'
foreach ($key in $keys) {
REG DELETE "HKEY_CLASSES_ROOT\$key" /ve /f
@logchan
logchan / add_copy_full_name.reg
Created December 13, 2018 20:59
Add a "Copy full name" explorer context menus
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Copy full name\command]
@="cmd /c echo | set /p=\"%1\"| clip"
[HKEY_CLASSES_ROOT\*\shell\Copy full name\command]
@="cmd /c echo | set /p=\"%1\"| clip"