Skip to content

Instantly share code, notes, and snippets.

View pavoldecky's full-sized avatar

Pavol Decky pavoldecky

View GitHub Profile
@phuysmans
phuysmans / gist:4f67a7fa1b0c6809a86f014694ac6c3a
Created January 8, 2018 09:29
docker compose health check example
version: '2.1'
services:
php:
tty: true
build:
context: .
dockerfile: tests/Docker/Dockerfile-PHP
args:
version: cli
volumes:
@TurBas
TurBas / disabledIfNotValid.ts
Created May 11, 2017 18:49
Aurelia disable button on validation errors
import {customAttribute, inject} from 'aurelia-framework'
import {ValidationController} from 'aurelia-validation'
import * as jQuery from "jquery";
@inject(Element)
@customAttribute('disabled-if-not-valid')
export class DisabledIfNotValid {
private element: JQuery;
private controller: ValidationController;
@jchandra74
jchandra74 / PowerShell Customization.md
Last active January 8, 2025 09:35
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@mrange
mrange / pipeline_performance.md
Last active May 10, 2021 13:34
Performance comparison of different data pipelines in .NET

Performance comparison of different data pipelines in .NET

Full source code can be found here

Changelog

  1. 2016-12-20
  2. New performance test - Paul Westcott (@manofstick) made me aware that SeqComposer has a more performant API. SeqComposer2 uses this API.
  3. 2016-12-23
@odarriba
odarriba / OpenVPN on Docker and Raspberry Pi.md
Last active March 12, 2024 15:13
How to install OpenVPN with Docker on Raspberry Pi

First of all, we are going to store all the data in a Docker shared volume, called openvpn_data.

To initialise the OpenVPN configuration and CA:

$ docker run -v openvpn_data:/etc/openvpn --rm evolvedm/openvpn-rpi ovpn_genconfig -u udp://your-vpn.address.com
$ docker run -v openvpn_data:/etc/openvpn --rm -it evolvedm/openvpn-rpi ovpn_initpki

To start daemon (and auto-restart it):

using System;
using System.Diagnostics;
using System.IO;
using System.IO.MemoryMappedFiles;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace FileAnalyzer
{
public static unsafe class NativeRecord
@Eun
Eun / project.csproj
Created November 16, 2016 10:02
ILMerge AfterBuild
<Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'">
<CreateItem Include="$(SolutionDir)\packages\ILMerge.*\tools\ILMerge.exe">
<Output TaskParameter="Include" ItemName="ILMergeExe" />
</CreateItem>
<Error Text="@(ILMergeExe) does not exists" Condition="!Exists('@(ILMergeExe)')" />
<CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true'">
<Output TaskParameter="Include" ItemName="ILMergeAssemblies" />
</CreateItem>
<Delete Files="$(OutputPath)\ILMerge.log" Condition="Exists('$(OutputPath)\ILMerge.log')" />
<Exec Command="&quot;@(ILMergeExe)&quot; /ndebug /log:$(OutputPath)\ILMerge.log /out:@(MainAssembly) &quot;@(IntermediateAssembly)&quot; @(ILMergeAssemblies-&gt;'&quot;%(FullPath)&quot;', ' ')" />
@rionmonster
rionmonster / IQueryableExtensions
Last active November 9, 2022 16:39
Resolve the SQL being executed behind the scenes in Entity Framework Core
public static class IQueryableExtensions
{
private static readonly TypeInfo QueryCompilerTypeInfo = typeof(QueryCompiler).GetTypeInfo();
private static readonly FieldInfo QueryCompilerField = typeof(EntityQueryProvider).GetTypeInfo().DeclaredFields.First(x => x.Name == "_queryCompiler");
private static readonly PropertyInfo NodeTypeProviderField = QueryCompilerTypeInfo.DeclaredProperties.Single(x => x.Name == "NodeTypeProvider");
private static readonly MethodInfo CreateQueryParserMethod = QueryCompilerTypeInfo.DeclaredMethods.First(x => x.Name == "CreateQueryParser");
@rockfordlhotka
rockfordlhotka / Index.cshtml
Last active January 23, 2023 09:54
Simple edit list of items in ASP.NET MVC
@* Goes in Views\PersonList *@
@using EditableListMvc.Models
@model IEnumerable<Person>
@{
ViewBag.Title = "Person List";
}
<h2>Person List</h2>