Skip to content

Instantly share code, notes, and snippets.

View christianjunk's full-sized avatar

Christian Junk christianjunk

View GitHub Profile
@christianjunk
christianjunk / Disable_OneDrive_Personal.reg
Created April 4, 2024 07:25
Disable OneDrive Personal
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\OneDrive]
"DisablePersonalSync"=dword:00000001
@christianjunk
christianjunk / chroot.sh
Last active July 7, 2023 10:46
This script can be used to create simple chroot environment.
#!/bin/bash
# This script can be used to create simple chroot environment
# Written by LinuxConfig.org
# (c) 2020 LinuxConfig under GNU GPL v3.0+
#!/bin/bash
CHROOT='/var/chroot'
mkdir -p $CHROOT
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@christianjunk
christianjunk / Code.cs
Created February 28, 2023 10:24 — forked from xt0rted/Code.cs
C# port of Bitwarden's random password algorithm
void Main()
{
var options = new PasswordOptions
{
Length = 13,
MinLowercase = 2,
MinNumbers = 2,
MinSpecial = 1,
MinUppercase = 2,
UseLowercase = true,
@christianjunk
christianjunk / ROIScan.vbs
Created February 4, 2023 13:43
Robust Office Inventory Scan - Version 1.9.1
' Name: Robust Office Inventory Scan - Version 1.9.1
' Author: Microsoft Customer Support Services
' Copyright (c) Microsoft Corporation. All rights reserved.
' Script to create an inventory scan of installed Office applications
' Supported Office Families: 2000, 2002, 2003, 2007
' 2010, 2013, 2016, O365
Option Explicit
On Error Resume Next
Const SCRIPTBUILD = "1.9.1"
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace TestConsole
{
// From https://stackoverflow.com/a/41392145/4213397
@christianjunk
christianjunk / obsidian-web-clipper-yaml.js
Last active January 5, 2022 08:44 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@christianjunk
christianjunk / create_vs_navigation_pane.bat
Created December 7, 2021 12:41
Create a permanent Visual Studio Cloud Storage Provider Navigation Pane
@echo off
set guid=4ce64c33-baf6-4491-90b1-1de2ff09276b
set name=Visual Studio 2019
set icon=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe
set folder=%%USERPROFILE%%\Source
:: Step 1: Add your CLSID and name your extension
reg add HKCU\Software\Classes\CLSID\{%guid%} /ve /t REG_SZ /d "%name%" /f
:: Windows Explorer Cloud Storage Provider Navigation Pane
:: Source: https://docs.microsoft.com/en-gb/windows/win32/shell/integrate-cloud-storage
@echo off
set guid=4ce64c33-baf6-4491-90b1-1de2ff09276b
set name=Visual Studio 2019
set icon=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe
set folder=%%USERPROFILE%%\Source
@christianjunk
christianjunk / TileMath.cs
Created August 8, 2021 12:59
Tile System math for the Spherical Mercator projection coordinate system (EPSG:3857)
```csharp
using System;
using System.Text;
namespace AzureMaps
{
/// <summary>
/// Tile System math for the Spherical Mercator projection coordinate system (EPSG:3857)
/// </summary>
public static class TileMath