Skip to content

Instantly share code, notes, and snippets.

View drandarov-io's full-sized avatar
:octocat:
Always learning...

Dmitrij Drandarov drandarov-io

:octocat:
Always learning...
View GitHub Profile
@drandarov-io
drandarov-io / notion_compact.user.js
Last active July 2, 2024 21:09
Adjust layout to waste less space with page icons and covers (Tampermonkey)
// ==UserScript==
// @name Notion Compact Page Icons and Covers
// @namespace http://tampermonkey.net/
// @version 1.7
// @description Adjust layout to waste less space with page icons and covers and reduce vertical spacing between blocks
// @author Dmitrij Drandarov
// @match https://www.notion.so/*
// @grant none
// @url https://gist.github.com/drandarov-io/51f0febb344539c979e9677e91b73d26
// ==/UserScript==
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#003543",
"foreground": "#00c983",
"leading_diamond": "\ue0b6",
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[object[]] $Arrays,
[switch] $Split,
[ValidateSet("Longest", "Shortest")]
[string] $OutputMode = "Shortest"
)
#Requires AutoHotkey v2.0
#SingleInstance
DetectHiddenWindows 1
sendSpotifyKey(key) {
; ControlClick "Intermediate D3D Window1", "ahk_class Chrome_WidgetWin_1 ahk_exe Spotify.exe"
; ControlFocus "Intermediate D3D Window1", "ahk_class Chrome_WidgetWin_1 ahk_exe Spotify.exe"
; ControlFocus "Chrome_RenderWidgetHostHWND1", "ahk_class Chrome_WidgetWin_1 ahk_exe Spotify.exe"
ControlFocus "Chrome Legacy Window", "ahk_class Chrome_WidgetWin_1 ahk_exe Spotify.exe"
# Update multiple packages
function wum {
<# .SYNOPSIS
Update multiple winget packages (supports -i). #>
Param([Parameter(Position = 0, Mandatory = $true)][string[]] $Packages)
foreach ($Package in $Packages) {
$Package = $Package.Trim()
Write-Host ("Upgrading {0} with 'winget upgrade $Package'..." -f $Package) -ForegroundColor Green
# ===== WINFETCH CONFIGURATION =====
# https://gist.github.com/assets/13102251/3f80c619-0142-4499-8477-fd5ec7297ac4
$image = "$($USERPATHS.config)/winfetch.png"
# $noimage = $true
# Display image using ASCII characters
$ascii = $true
# Set the version of Windows to derive the logo from.
@drandarov-io
drandarov-io / dmitr.io-onemore.xml
Last active June 16, 2024 13:36
OneMore Adjusted Style
<?xml version="1.0" encoding="utf-8"?>
<Theme key="Default" name="dmitr.io" color="automatic" setColor="False" dark="False">
<Style index="0" name="Code" font="Cascadia Code" fontColor="#001400" fontSize="9.0" spaceBefore="2.0" spaceAfter="5.0" spacing="12.0" applyColors="true" styleType="Paragraph" />
<Style index="1" name="Heading 1" font="Calibri Light" fontColor="#000000" fontSize="20.0" spaceBefore="14.0" spaceAfter="0.0" spacing="0.0" applyColors="true" styleType="Heading" />
<Style index="2" name="Heading 2" font="Calibri Light" fontColor="#E67832" fontSize="18.0" spaceBefore="14.0" spaceAfter="0.0" spacing="0.0" applyColors="true" styleType="Heading" />
<Style index="3" name="Heading 3" font="Calibri Light" fontColor="#823D0A" fontSize="16.0" spaceBefore="12.0" spaceAfter="0.0" spacing="0.0" applyColors="true" styleType="Heading" />
<Style index="4" name="Heading 4" font="Calibri Light" fontColor="#C85A14" fontSize="14.0" spaceBefore="12.0" spaceAfter="0.0" spacing="0.0" applyColors="true" s
@drandarov-io
drandarov-io / printer_CR10_Maxxed.cfg
Last active June 7, 2023 14:11
Klipper configuration for a heavily modified CR-10 Max
# This file contains pin mappings for the Creality CR-10 Max. To use
# this config, the firmware should be compiled for the AVR atmega2560.
# See docs/Config_Reference.md for a description of parameters.
# https://gist.github.com/drandarov-io/5096a966972f9bb5e1657711d5d55614
[include mainsail.cfg]
[mcu]
{
"QuickTaskPresets": [
{
"Name": "Save, Pin",
"AfterCaptureTasks": "PinToScreen, SaveImageToFile",
"AfterUploadTasks": "None"
},
{
"Name": "Save, Copy image",
"AfterCaptureTasks": "CopyImageToClipboard, SaveImageToFile",
@drandarov-io
drandarov-io / $PROFILEUSER.ps1
Created January 19, 2023 11:09
Sampels for $PROFILE.CurrentUserAllHosts used to overwrite certain local behavior
# Use VS Code Insider as code alias
Set-Alias -Name code -Value code-insiders
Set-Alias -Name code.cmd -Value code-insiders