This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutofacRegistration_Tests | |
{ | |
[Fact] | |
public void any_type_in_service_layer_should_NOT_be_registered_as_InstancePerRequest() | |
{ | |
var containerRegistrations = GetContainer().ComponentRegistry.Registrations; | |
var results = containerRegistrations.ToDictionary(reg => reg, IsRegistrationScopeInstancePerRequest); | |
/* When test fails, debug this test and run following command in `Immediate console`: | |
* var invalid = results.Where(r=>r.Value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You should have: installed Docker Toolbox along with VirtualBox. | |
# This was tested on Win8.1. | |
docker-machine rm default; | |
docker-machine create default --driver virtualbox; | |
# docker-machine env default; | |
& "C:\Program Files\Docker Toolbox\docker-machine.exe" env default | Invoke-Expression; | |
# From now on should be able to use Docker API; f.e. type `docker ps` to see running containers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial | |
MAINTAINER pizycki | |
EXPOSE 4000 35729 | |
RUN mkdir ~/izzydev | |
WORKDIR ~/izzydev | |
RUN \ | |
apt-get update && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[String] $Location, | |
[String] $Pattern=".*", | |
[String] $Seperator="" | |
) | |
# Create file | |
$tempFile = "temp.txt" | |
New-Item -Name $tempFile -ItemType "file" -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get&Run: | |
# curl https://gist.githubusercontent.com/pizycki/e7a941ef99d9dc6d5c05ed444254dd6d/raw/7c36f0e913acdb6a81c7d9c1a48ccff2ee8468c8/SetupWSL.sh -o ~/install-jekyll.sh && bash ~/install-jekyll.sh | |
# Print Ubuntu version | |
lsb_release -a | |
# Upgrade Ubuntu to latest | |
sudo do-release-upgrade | |
# Install software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using Monacs.Core; | |
namespace EitherExampleExceptions | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using LanguageExt; | |
using static LanguageExt.Prelude; | |
// Based on https://github.com/louthy/language-ext/tree/master/Samples/BankingAppSample | |
namespace FreeIzzy | |
{ | |
public class StartPaymentRequest : Record<StartPaymentRequest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone git@bitbucket.org:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync git@github.com:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -a -b -o | sls <port> | |
Stop-process PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Process | where {$_.Name -eq 'process name'} | Format-Table id, name |
OlderNewer