Skip to content

Instantly share code, notes, and snippets.

View stesee's full-sized avatar
💭
👨‍💻

Stefan Seeland stesee

💭
👨‍💻
View GitHub Profile
@stesee
stesee / extensions.json
Last active October 19, 2020 14:52
put a extensions.json into your .vscode dir to trigger the recommendation dialog in vs code, see also https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions, use "code --list-extensions" to list your currently used extensions
{
"recommendations": ["adamhartford.vscode-base64","bierner.github-markdown-preview","bierner.markdown-checkbox","chintans98.arkdown-jira","dangmai.workspace-default-settings","DavidAnson.vscode-markdownlint","dbaeumer.vscode-eslint","denco.confluence-markup","DotJoshJohnson.xml","EditorConfig.EditorConfig","emilianox.flow-jira-commit-prefix","esbenp.prettier-vscode","fernandoescolar.vscode-solution-explorer","formulahendry.dotnet-test-explorer","GrapeCity.gc-excelviewer","Gruntfuggly.todo-tree","hbenl.vscode-test-explorer","k--kato.docomment","mhutchie.git-graph","ms-dotnettools.csharp","ms-mssql.mssql","ms-vscode.cpptools","ms-vscode.powershell","ms-vsliveshare.vsliveshare","ms-vsliveshare.vsliveshare-audio","msjsdiag.debugger-for-edge","Orta.vscode-jest","redhat.vscode-yaml","ryu1kn.partial-diff","slevesque.vscode-hexdump","streetsidesoftware.code-spell-checker","streetsidesoftware.code-spell-checker-german","wghats.vscode-nxunit-test-adapter"]
}
taskkill /f /im OneDrive.exe
& "$env:SystemRoot\SysWOW64\OneDriveSetup.exe" /uninstall
# Take Ownsership of OneDriveSetup.exe
$ACL = Get-ACL -Path $env:SystemRoot\SysWOW64\OneDriveSetup.exe
$Group = New-Object System.Security.Principal.NTAccount("$env:UserName")
$ACL.SetOwner($Group)
Set-Acl -Path $env:SystemRoot\SysWOW64\OneDriveSetup.exe -AclObject $ACL
# Assign Full R/W Permissions to $env:UserName (Administrator)
@stesee
stesee / ReencodeAudio.sh
Created August 30, 2020 18:48
Reencodes only audio of some video, usabel to make a dbt-2 stream watchable in browser (they use ec-3 in my country)
ffmpeg -i In.mp4 -map 0:v -c:v copy -map 0:a -c:a:0 aac Out.mp4
@stesee
stesee / mkvToMp4.sh
Last active August 23, 2020 19:31
remuxing mkv to mp4 and delete all mkvs in a directory
for f in *.mkv; do echo "Processing $f file.."&&ffmpeg -i "$f" -c copy "$f.mp4"&& rm "$f"; done
function Test-SqlConnection {
param(
[Parameter(Mandatory)]
[string]$ServerName,
[Parameter(Mandatory)]
[string]$DatabaseName
)
$connectionString = "Data Source=$ServerName;Integrated Security=true;Initial Catalog=master;Connect Timeout=3;database=$DatabaseName;"
$sqlConn = new-object ("Data.SqlClient.SqlConnection") $connectionString
ssh-keygen
ssh-copy-id username@remote_host
#!/bin/bash
# install stuff before using this script
# sudo apt install libxml-xpath-perl curl
#configure your kodi settings
URL=localhost
PORT=9981
USERNAME=kodi
PASSWORD=kodi
@stesee
stesee / robocopyUserProfiles.ps1
Last active September 26, 2021 15:01
Robocopy all windows userprofile
robocopy "$env:UserProfile\..\" F:\UserprofileBackup *.* /r:0 /w:0 /mir /sl /XJ
@stesee
stesee / VS16NoTelem.bat
Created March 28, 2020 13:57
Disable telemetry in Visual Studio 2019
@echo off
fltmc >nul 2>&1 || (
echo This batch script requires administrator privileges. Right-click on
echo the script and select "Run as administrator".
goto :die
)
rem Change this path if you are using Community or Professional editions
set "VS_INSTALL_DIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise"
@stesee
stesee / gif2mp4.sh
Created February 8, 2020 19:16
Converts gif to mp4 using ffmpeg
ffmpeg -i source.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" destination.mp4