Skip to content

Instantly share code, notes, and snippets.

View felegy's full-sized avatar
🎯
Focusing

Gabor FELEGYHAZI felegy

🎯
Focusing
View GitHub Profile
@felegy
felegy / gist:9941753
Last active August 29, 2015 13:58
How to enable syntax highlighting and-other options in vim on OSX

How to enable syntax highlighting and other options in vim on OSX

To fix this, open a new Terminal window and enter these commands to open vim's configuration file:

cd /usr/share/vim
sudo vim vimrc

Press the "i" key to switch vim to Insertion Mode, then enter these lines below the set backspace=2 line:

set ai " auto indenting

Git create Zip latest committed changes only (or changes between two commits)

git archive -o ../deploy.zip some-commit $(git diff --name-only earlier-commit some-commit)
@felegy
felegy / ReadMe.md
Last active December 3, 2018 15:53
Keybase proof

Keybase proof

I hereby claim:

  • I am felegy on github.
  • I am felegy (https://keybase.io/felegy) on keybase.
  • I have a public key ASBeO477TiO3Y5M93navkCFo0wZgczU8Gx7l-mcPeBt8pwo

To claim this, I am signing this object:

@felegy
felegy / Dockerfile
Last active December 15, 2018 12:09
Docker Dotnet Mono for Paket restore and build net core runtime with app
FROM microsoft/dotnet:2.2-sdk AS build-env
ARG PROJ_FILE
ARG PROJ_PATH
# Install MONO and Nuget for Paket dependency manager
RUN apt-get update -y \
&& apt-get install \
gnupg \
gnupg1 \
public class MicrosecondEpochConverter : Newtonsoft.Json.Converters.DateTimeConverterBase
{
private static readonly System.DateTime _epoch = new System.DateTime(1970, 1, 1, 0, 0, 0, System.DateTimeKind.Utc);
public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
{
writer.WriteRawValue(((System.DateTime)value - _epoch).TotalMilliseconds + "000");
}
public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
public class SidPocTest
{
private const int DefaultSize = 8;
private const string DefaultAlphabet = "123456789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
@felegy
felegy / .1_lando-heroku-php.md
Last active November 4, 2019 17:17
Lando Heroku PHP scaffold

Lando Heroku PHP

Lando Heroku PHP scaffold

  • Heroku identical devenv (as far as possible)
    • heroku-18 official docker image
    • heroku official PHP buildpack
  • Integrated tooling
    • Composer on appserver
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDynuma5eJ1JvkpyAUUt8uQI+IvMBJ3fKBo9SJQr3Po/ho1aLFSEv5tUC20j2UAjNVmB2iFV1VVIOC0uigMDtV1T5PvLKjjjXHGYmicH/vfuiuf7dFYmMYPD225dNfnpYHisjxuItAezd8Rdbtsi4TP0HldNQJuAlla1hl5WACN2IBngnwmSatNa116yAbsgzK7MLsXY2w7rgiSyBqtrktiW5wrP00an2ImUDMBIsh7HyaGFLi/eOzEZu8GUd4yaBvGqn5qpOs5VSX+U/qSTfD+nyNEYKN5BIEH+ctBaNQP3vwHvf73CuNuIqmV88dJ/Gun1o+GlxtaL+/BmY8haz4n6AGr9pO1KVgDH5YNUcybpAsH+DzDvSc//wU/3f1qhsbezLw6oFCqcL8xmRu2eiFRHh/3UqDb3jrhYiQ5r6/3+Yv78S8PgU0fwBCK1t0sU9IfsLmLt6Jrmknxxg8UD6GjNc+KG6EvfMOqB2YKR2dI/k44OKNwwEcS6M1rulQS2U9eaAs97GyhU2umNG2RvF+eiCUwI/Uisz9F0yEoU2veop6JAFTd4GSNM758m0OswEhW8++/TFpuA5WEnvi+5ccuhJT6rKJuS194p4DpB3QzKOLxzWNQVRpcXSc7lO5RjtELj5mPP4zc5D6x5jtntNNyd5wjYxCg2D3uCOMPSb/+Yw== cardno:000612033806
# use docker_provider: "ee", "ce", "master" or ""
$docker_provider = "master"
$docker_version = "19.03.8"
if (Test-Path env:docker_provider) {
$docker_provider = $env:docker_provider
}
if (Test-Path env:docker_version) {
$docker_version = $env:docker_version
}

Cake Build FakeProcessRunner

The main purpose of this to dump the process command and arguments in string format for later execution or use it (for example use to run inside Docker). I would like to run the system related tests in a build process based on cake generated test commands in separated environments (like Docker swarm service in compose/swarm stack).

Cake dotnet Test command:

DotNetCoreTest(SolutionFile, new DotNetCoreTestSettings
{
    Configuration = configuration,