Skip to content

Instantly share code, notes, and snippets.

@pavelsource
pavelsource / fix-outlook-calendar-categories.md
Last active August 25, 2025 08:12
Fix disappeared Microsoft Outlook calendar categories on MacOS

In order to fix disappeared Microsoft Outlook calendar categories on MacOS:

  • Close Microsoft Outlook
  • Navigate to ~/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/Data/Categories
  • Delete everything in that folder
  • Open Microsoft Outlook again
  • Wait till it synchronizes with Exchange Server
  • Done!

Complete script:

@pavelsource
pavelsource / zsh-setup.md
Last active August 23, 2019 15:19
Quick Zsh Setup

Prerequesits

  • MacOS
  • Homebrew
  • iTerm2

Installation

CLI tools for Xcode

@pavelsource
pavelsource / dotnet-core-cleanup.sh
Last active November 23, 2023 17:44
Example of deletion script for old .NET Core SDK and Runtimes for MacOS
# find which FXR versions are installed and delete old ones
find /usr/local/share/dotnet/host/fxr -mindepth 1 -type d | sort
sudo rm -rf /usr/local/share/dotnet/host/fxr/2.1.5
# find which SDKs versions are installed and delete old ones
dotnet --list-sdks
sudo rm -rf /usr/local/share/dotnet/sdk/2.1.5
# find which runtimes versions are installed and delete old ones
dotnet --list-runtimes
@pavelsource
pavelsource / deploy-music-store-app.sh
Created May 3, 2018 07:08
Updated version of the deployment script for Microsoft Music Store example application
#!/bin/bash
# remove console warnings
export DEBIAN_FRONTEND=noninteractive
# install dotnet core
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo add-apt-repository universe
@pavelsource
pavelsource / azure-sql-table-size.sql
Created September 18, 2017 14:48
Determine size of the tables in Azure MS SQL Database
SELECT
obj.NAME,
SUM(reserved_page_count) * 8.0 / 1024 AS "Size (MB)"
FROM sys.dm_db_partition_stats stat
INNER JOIN sys.objects obj ON stat.object_id = obj.object_id
GROUP BY obj.name
ORDER BY "Size (MB)" DESC
@pavelsource
pavelsource / vue.eventbus.js
Created February 15, 2017 09:55
Use Vue.js object as an EventBus (ServiceBus) for component interaction
// Create a global Event Bus
var EventBus = new Vue();
// Extend Vue component properties by exposing a getter for $eventbus
Object.defineProperties(Vue.prototype, {
$eventbus: {
get: function () {
return EventBus;
}
}
@pavelsource
pavelsource / GoogleAnalyticsHelper.cs
Last active April 17, 2021 00:52
Simple C# wrapper for Google Analytics Measurement Protocol API
namespace Helpers
{
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
// More information about API - see https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
public class GoogleAnalyticsHelper
{
private readonly string endpoint = "http://www.google-analytics.com/collect";