Skip to content

Instantly share code, notes, and snippets.

View swedishkid's full-sized avatar

Kasper Eklander swedishkid

  • Copenhagen, Denmark
View GitHub Profile
{
"$schema": "http://json-schema.org/draft-06/schema#",
"description": "An Address following the convention of http://microformats.org/wiki/hcard",
"type": "object",
"properties": {
"post-office-box": { "type": "string" },
"extended-address": { "type": "string" },
"street-address": { "type": "string" },
"locality":{ "type": "string" },
"region": { "type": "string" },
@swedishkid
swedishkid / setup-apache-spark-windows10.ps1
Created January 12, 2017 10:25
Setup Apache Spark on Windows 10
Write-Host "Downloading spark..."
@swedishkid
swedishkid / 1readme.md
Created July 12, 2016 19:07 — forked from akimboyko/1readme.md
ScriptCs as embedded scripting engine for .Net application with NuGet support

ScriptCs as embedded scripting engine for .Net application with NuGet support

This gist contains:

  • ExecuteScriptCs.cs — class that are able to execute ScriptCs from another .Net application
  • ScriptModule.cs — AutoFac configuration for ScriptCs/NuGet dependencies
  • Program.cs — command-line example
  • Sample.csx — sample ScriptCs script
  • packages.config — NuGet packages configuration
using Nancy;
using Nancy.Responses;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace DotNetBook.Primer
{
public class Recipe
{
private readonly JArray recipes = new JArray();
public sealed class RedirectToDynamicEvent
{
public readonly IDictionary<Type, List<Wire>> Dict = new Dictionary<Type, List<Wire>>();
public sealed class Wire
{
readonly MethodInfo _method;
public Type ParameterType;
readonly object _subject;
readonly bool _includeVersion;
@swedishkid
swedishkid / Program.cs
Created March 22, 2016 04:59 — forked from ovrmrw/Program.cs
Topshelf + OWIN Self-Host + ASP.NET WebAPI + Ninject
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Tracing;
using System.Reflection;
using Owin;
@swedishkid
swedishkid / InstallationStack.md
Created November 19, 2015 03:34 — forked from pjnovas/InstallationStack.md
Complete Install on Ubuntu Server of Nodejs + MongoDB + NGINX

##Ubuntu Server

NodeJS

sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28
@swedishkid
swedishkid / ProjectDependencies.cs
Last active September 17, 2015 04:42 — forked from mikeminutillo/ProjectDependencies.cs
Get project dependency graph out using yuml.me and LINQPad
void Main()
{
var ignores = new Regex[]
{
new Regex(@"Approval"),
new Regex(@"Test"),
new Regex(@"Demo")
};
var serviceControl = @"C:\Code\Particular\ServiceControl\src\";
Util.Image("http://yuml.me/diagram/scruffy;scale:150/class/" + String.Join(",", GetDependencies(serviceControl, ignores))).Dump();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Data;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using System.Reactive.Linq;
!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};