Skip to content

Instantly share code, notes, and snippets.

@zeqk
zeqk / accessing-virtualbox.md
Created June 15, 2018 15:51
Accessing your Virtualbox Guest from your Host OS

Accessing your Virtualbox Guest from your Host OS

As a developer you want to ping and access the webserver on your virtual machine. This is a very simple solution to enable the bridge to the guest VM.

Requirements

  • VirtualBox (latest version)
  • A guest operation system (e.g. Ubuntu)
@zeqk
zeqk / ilmerge_command
Created July 3, 2018 15:04
ILMerge command
ilmerge batsOpener.exe CommandLine.dll Newtonsoft.Json.dll /out:fullBatsOp
ener.exe /targetplatform:'v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319'
@zeqk
zeqk / UsageNHibernateAsync.cs
Created July 5, 2018 13:33 — forked from erdtsieck/UsageNHibernateAsync.cs
This gist shows how to use the NHibernate async API
#region ICriteria async API
// Usage ICriteria.ListAsync<T>()
var customers = await session.CreateCriteria<Customer>().ListAsync<Customer>();
// Usage ICriteria.UniqueResultAsync<T>()
var customer = await session
.CreateCriteria<Customer>()
.Add(Restrictions.Eq("Name", "Erdtsieck"))
.UniqueResultAsync<Customer>();
$path = "test"
$filter = "*.config"
#To support both absolute and relative paths..
$pathitem = Get-Item -Path $path
#If sourcepath exists
if($pathitem) {
#Get name for tempfolder
$tempdir = Join-Path $env:temp "CompressArchiveTemp"
FROM microsoft/aspnet
ARG buildarea=production
RUN echo $env:buildarea
Get-ChildItem -File -Filter "*.csproj" | ForEach-Object {
New-Item -ItemType Directory $_.BaseName -Force;
Move-Item -Path $_.FullName -Destination $_.BaseName
}
@zeqk
zeqk / docker-cleanup-resources.md
Created July 20, 2018 13:33 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

docker run -d -p 27017:27017 -v ~/wikijs_mongo_data:/data/db --restart always --name wikijs-mongodb mongo
sudo docker run -d -p 8080:3000 -e "[email protected]" -v ~/wiki-config.yml:/var/wiki/config.yml --restart always --name wikijs --link wikijs-mongodb --add-host grafana.osperyh.org.ar:172... requarks/wiki
@zeqk
zeqk / nginxproxy.md
Created July 26, 2018 23:22 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers