Skip to content

Instantly share code, notes, and snippets.

View spitfire05's full-sized avatar
🦀

Michał Borejszo spitfire05

🦀
  • Emerson Automation Solutions
  • Warsaw, Poland
  • 17:20 (UTC +02:00)
View GitHub Profile
@spitfire05
spitfire05 / config.nu
Last active June 24, 2024 09:17
Nushell git aliases
def git_current_branch () {
git branch --show-current | str trim -c "\n"
}
alias s = git status -sb
alias g = git
alias ga = git add
alias gaa = git add --all
alias gapa = git add --patch
alias gau = git add --update
@spitfire05
spitfire05 / dracula-at-night.json
Created March 26, 2020 09:45
Dracula at night - Windows Terminal | based on https://github.com/bceskavich/dracula-at-night
{
"name" : "Dracula at night",
"background" : "#0E1419",
"black" : "#21222C",
"blue" : "#BD93F9",
"brightBlack" : "#6272A4",
"brightBlue" : "#D6ACFF",
"brightCyan" : "#A4FFFF",
"brightGreen" : "#69FF94",
"brightPurple" : "#FF92DF",
@spitfire05
spitfire05 / Get-ScreenServiceTags.ps1
Created March 12, 2020 11:22
Get serial number of connected screens with Powershell
$Monitors = Get-WmiObject WmiMonitorID -Namespace root\wmi
ForEach ($Monitor in $Monitors)
{
    $Manufacturer = ($Monitor.ManufacturerName -notmatch 0 | ForEach{[char]$_}) -join ""
    $Name = ($Monitor.UserFriendlyName -notmatch 0 | ForEach{[char]$_}) -join ""
    $Serial = ($Monitor.SerialNumberID -notmatch 0 | ForEach{[char]$_}) -join ""
   
    "$Manufacturer,$Name,$Serial"
}
@spitfire05
spitfire05 / t3-improved.js
Last active October 14, 2019 06:50
T3 Improved source
// ==UserScript==
// @name T3-Improved
// @namespace emrsn.net/
// @version 0.2.2
// @description Improves T3 Time Tracker usability
// @author michal.borejszo@emerson.com
// @match http://usaust-techweb2/t3/*
// @grant none
// @updateURL https://gist.githubusercontent.com/spitfire05/da6be0638b2358bdb7a45de30a826771/raw/t3-improved.js
// ==/UserScript==
@spitfire05
spitfire05 / updateip.sh
Last active April 8, 2019 17:19
A shell script checking the public IP of the host it is run on, and uploading to to a git repository
print_usage () {
echo "USAGE: updateip.sh PATH FILE"
}
if [ -z "$1" ]; then
print_usage
exit 1
fi
if [ -z "$2" ]; then
@spitfire05
spitfire05 / monokai_vs2017.vssettings
Created November 8, 2018 12:55
Monokai theme for Visual Studio 2017
<!-- Based on https://github.com/Ibrahim-Islam/monokai-vs-2015 -->
<UserSettings>
<ApplicationIdentity version="15.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
</ToolsOptions>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package">
<PropertyValue name="Version">2</PropertyValue>
<FontsAndColors Version="2.0">
@spitfire05
spitfire05 / disableoutlookalts.ps1
Created April 6, 2017 18:54
Script disabling annoying Alt+S shortcut in Outlook 365
$path = "HKCU:\Software\Policies\Microsoft\Office\16.0\Outlook\DisabledShortcutKeysCheckBoxes"
New-Item $path -Force
New-ItemProperty -Path $path -Name "Alt+S" -Value "83,16" -PropertyType String
@spitfire05
spitfire05 / extract.ps1
Created September 27, 2016 14:59
Powershell snippet: extract zipfile (pure PS, no .net)
$shell_app=new-object -com shell.application
$zip_file = $shell_app.namespace($ZipPath)
$destination = $shell_app.namespace($DestinationPath)
$destination.Copyhere($zip_file.items())
@spitfire05
spitfire05 / bf2-con-highlight.xml
Last active August 29, 2015 13:57
Battlefield 2 con highlight for Notepad++
<NotepadPlus>
<UserLang name="BF2 Con" ext="con tweak inc ai" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="yes" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="yes" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00rem 01 02 03beginrem 04endrem</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>