Skip to content

Instantly share code, notes, and snippets.

View IanSavchenko's full-sized avatar
💭
Setting status on GitHub...

Ian Savchenko IanSavchenko

💭
Setting status on GitHub...
View GitHub Profile
@IanSavchenko
IanSavchenko / add_lo0_alias.sh
Last active September 19, 2019 08:55
Add an alias for loopback interface on startup of MacOS for https://github.com/otm/limes
#!/bin/bash
# This script adds an alias for loopback interface on start of MacOS X.
# This is needed in order for https://github.com/otm/limes to work properly.
#
# Inspired by
# https://apple.stackexchange.com/questions/311188/running-a-sudo-command-on-startup
#
# USAGE (with local cloned version):
# sudo bash add_lo0_alias.sh
@IanSavchenko
IanSavchenko / keybase.md
Created January 25, 2018 08:43
keybase.md

Keybase proof

I hereby claim:

  • I am iansavchenko on github.
  • I am iansavchenko (https://keybase.io/iansavchenko) on keybase.
  • I have a public key ASBKpg2VZEtBPI5ie-JIIknZK2qfDlOksGkOCiyxzOHgnQo

To claim this, I am signing this object:

using System;
using System.Threading;
using Windows.ApplicationModel;
using Windows.UI.Xaml;
namespace IanSavchenko.Services
{
/// <summary>
/// Provides real time clock events.
/// </summary>
@IanSavchenko
IanSavchenko / README.md
Last active January 1, 2018 19:35
Monitorable C#

Monitorable for C#

Sometimes (pretty often) there is a need to have a class with properties which can have value and a coupled event for when this value changes. Monitorable allows to skip a routine of creating a readonly property with an event. Repeating code like this:

class MyClass
{
    private int _property = 0;