Skip to content

Instantly share code, notes, and snippets.

View robert-skarzycki's full-sized avatar

Robert Skarżycki robert-skarzycki

View GitHub Profile
@robert-skarzycki
robert-skarzycki / tips.md
Last active February 8, 2017 21:22
VS tips and tricks

Slide 1

Text


Slide 2

  • bullet 1
  • bullet 2
@robert-skarzycki
robert-skarzycki / git-commands.md
Last active January 16, 2020 09:26
Git commands

Show last few comments

git log HEAD~10..HEAD

List recently modified branches

git for-each-ref --count=50 --sort=-committerdate refs/heads/ --format="%(refname:short) [%(color:green)%(committerdate:relative)%(color:reset)]"

List merges with only commit message

git log --merges --pretty=%s

Remove branches that are no longer on remote

@robert-skarzycki
robert-skarzycki / marten-problems-reproduction.cs
Created February 15, 2019 14:49
Classes for reproduction problems I faced with Marten
using System;
using System.Collections.Generic;
using Marten.Schema;
namespace marten_playground
{
public class Root
{
public Guid Id { get; set; }
public string Name { get; set; }
using (var session = _store.LightweightSession())
{
var product1 = new Root
{
Id = Guid.NewGuid(),
Name = "root-1",
ChildsLevel1 = new[]{
new ChildLevel1{
Id = Guid.NewGuid(),
@robert-skarzycki
robert-skarzycki / docker-commands.md
Last active February 22, 2019 09:39
Cheat sheet for docker commands

Build image

docker build -t <template_name> .

Run build image & redirect port

docker run -p <port_on_host>:<port_in_container> <image_name>

List of running container instances

docker ps

Log into running instance bash

@robert-skarzycki
robert-skarzycki / azure-snippets-tips.md
Created February 26, 2019 08:16
Azure snippets & tips

To run Linux-hosted dotnet web app in Azure App Service

Set command in "Startup File" input on "Application settings" pane of app service:

dotnet /home/site/wwwroot/{yourDLLName}.dll

https://stackoverflow.com/a/48145960/2017882

How install docker on bare Ubuntu

1.Run following commands

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce
sudo docker run hello-world