Skip to content

Instantly share code, notes, and snippets.

🤘
|m/

Bogdan Mart Mart-Bogdan

🤘
|m/
  • Ukraine
Block or report user

Report or block Mart-Bogdan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mart-bogdan on github.
  • I am winnie_ua (https://keybase.io/winnie_ua) on keybase.
  • I have a public key ASDR4oc_1BmeWWrAYTdggM_czCpD7-ZXFVyOGxsxwe9-dAo

To claim this, I am signing this object:

View CommandsBindingModule.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ua.kpi.acts.samuel.agent.inject.modules;
import com.google.inject.AbstractModule;
import com.google.inject.multibindings.MapBinder;
import java.util.Set;
View harlem-shake.js
javascript: (function () {
function c() {
var e = document.createElement("link");
e.setAttribute("type", "text/css");
e.setAttribute("rel", "stylesheet");
e.setAttribute("href", f);
e.setAttribute("class", l);
document.body.appendChild(e)
}
function h() {
@Mart-Bogdan
Mart-Bogdan / Ef_Selects.cs
Created Jan 9, 2017
Samples of using selects with entity framework
View Ef_Selects.cs
public async Task<ICollection<Tuple<Site,ICollection<String>>>> GetSitesByUserIdAsync(int userId)
{
StringBuilder sb = new StringBuilder();
Action<string> action = s => sb.Append(s);
_context.Database.Log += action;
var res= await _context.UserSiteAccesses
.Where(p => p.UserId == userId && p.Accsess == "read")
.Select(p => new RwTuple<Site,ICollection<String>>
{
@Mart-Bogdan
Mart-Bogdan / CommandExecution.cs
Created Jul 27, 2016
TaskCompletionSource sample
View CommandExecution.cs
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using SamuelServer.Common.Communication;
using SamuelServer.Common.Communication.Interfaces;
using SamuelServer.Common.Exceptions;
using SamuelServer.Common.Interfaces;
using SamuelServer.Common.Wrappers;
using SamuelServer.IOCCommon.Attributes;
View AlternativeInit.cs
private void InitSerilog()
{
var logPath=Context.Server.MapPath(@"~/Logs");
var factory = new LoggerConfiguration()
.Enrich.FromLogContext()
.Enrich.WithThreadId()
.Enrich.With(new HttpRequestIdEnricher())
.MinimumLevel.Verbose();
//.WriteTo.ColoredConsole(
////outputTemplate: "{Timestamp:o} [{Level}] [{SourceContext:l}] ({ThreadId}) [{NDC}]{NewLine}{Message}{NewLine}{Exception:l}"
View docx2doc.vbs
rem enum WdSaveFormat
const wdFormatDocument = 0 rem <-- DOC
const wdFormatDocument97 = 0
const wdFormatTemplate = 1
const wdFormatTemplate97 = 1
const wdFormatText = 2
const wdFormatTextLineBreaks = 3
const wdFormatDOSText = 4
const wdFormatDOSTextLineBreaks = 5
View ChangePassword.java
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
View getActiveWindow.java
import static enumeration.EnumerateWindows.Kernel32.*;
import static enumeration.EnumerateWindows.Psapi.*;
import static enumeration.EnumerateWindows.User32DLL.*;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.platform.win32.WinDef.HWND;
import com.sun.jna.ptr.PointerByReference;
public class EnumerateWindows {
private static final int MAX_TITLE_LENGTH = 1024;
View SliderWithTextField.java
import javafx.application.Application;
import javafx.beans.property.*;
import javafx.beans.value.*;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.input.*;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
You can’t perform that action at this time.