Skip to content

Instantly share code, notes, and snippets.

View ashchuk's full-sized avatar
😎
Changing the world

Artyom Koshko ashchuk

😎
Changing the world
View GitHub Profile
@ashchuk
ashchuk / keepalived.backup.conf
Created May 16, 2020 09:00
keepalived configuration sample
global_defs {
### notification_email {
### notificationemail@test.com
### }
### notification_email_from master01@test.ru
### smtp_server 192.21.0.2
### smtp_connect_timeout 30
router_id LVS_VIPTEST
vrrp_skip_check_adv_addr
<DataTemplate x:Key="AnswerListDataTemplate">
<Border Margin="5" BorderThickness="2" BorderBrush="White" Background="Transparent"
DataContext="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Content}">
<TextBlock Margin="10" FontSize="28" TextWrapping="WrapWholeWords" Text="{Binding Text}"/>
</Border>
</DataTemplate>
<DataTemplate x:Key="PivotQuestionDataTemplate">
<StackPanel Orientation="Vertical">
<TextBlock FontSize="28" Margin="20" TextWrapping="WrapWholeWords" Text="{Binding Text}"/>
@ashchuk
ashchuk / Scenario1_ListView.xaml
Last active September 6, 2017 07:30
Simple drag sample
<!--
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
@ashchuk
ashchuk / Form1.Designer.cs
Last active July 28, 2017 12:21
WinForms test app
namespace WindowsFormsApp1
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
@ashchuk
ashchuk / nfcservice.cs
Last active July 25, 2017 13:35
NFC interactrion service and ViewModel
// in App.xaml.cs NFCService registered as singleton
RegisterTypeIfMissing(typeof(INFCService), typeof(NFCService), true);
// NFC service
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Networking.Proximity;
using System;
using Windows.UI.Core;
using MyApp.Models;
using Windows.UI.Xaml;
@ashchuk
ashchuk / Square.java
Created July 10, 2017 11:41
Square class
package com.example.ashchuk.photosender.gl;
import android.opengl.GLES20;
import android.opengl.Matrix;
import android.os.SystemClock;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/**