Skip to content

Instantly share code, notes, and snippets.

View msveden's full-sized avatar
💭
Coding...

Martin Svedén msveden

💭
Coding...
View GitHub Profile
With marked text, ctrl + shift + l, makes all occurances editable.
With marked text, alt + shift + i, put edit cursor at end of each line
@msveden
msveden / deploy-dotnet-core-3-on-heroku.md
Last active November 3, 2019 09:31
How to deploy a dotnet core 3 web app on Heroku

Create a Docker file in the app root with this content:

#Grab the latest alpine image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0

# Add our code
ADD ./bin/Release/netcoreapp3.0/ /app
WORKDIR /app
#!/bin/sh
# This script:
# 1. Creates a bare git repo in /opt/[name-of-repo]
# 2. Clones the bare git repo to a "live" location
# 3. Creates a post-receive hook script
#
# Command line usage:
# the-name-of-this-file name-of-repo
@msveden
msveden / nginx-stuff.md
Created February 5, 2018 20:48
Nginx stuff

Change site settings here

sudo nano /etc/nginx/sites-available/default

Check that the config file syntax is OK

sudo nginx -t

Restart Nginx

@msveden
msveden / test-post-receive-without-push.md
Last active April 13, 2018 12:22
Testing post-receive hook without pushing changes

Find the last two commits by:

git log -2 --format=oneline --reverse

Then run the hook by:

echo "[from-commit-id] [to-commit-id] master" | ./hooks/post-receive

@msveden
msveden / AggregationTestCase.java
Created March 10, 2012 06:03 — forked from johndemic/AggregationTestCase.java
Complete Async Aggregation Example
package org.mule.example.cep;
import org.mule.api.MuleMessage;
import org.mule.api.MuleMessageCollection;
import org.mule.api.client.MuleClient;
import org.mule.tck.FunctionalTestCase;
import org.mule.util.CollectionUtils;
import java.util.*;