Skip to content

Instantly share code, notes, and snippets.

View vonwenm's full-sized avatar

Marcelle von Wendland vonwenm

View GitHub Profile
@vonwenm
vonwenm / setup.cmd
Last active August 29, 2015 14:19 — forked from ferventcoder/setup.cmd
@echo off
SET DIR=%~dp0%
@PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%setup.ps1' %*"
pause
import scala.concurrent._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits._
import scala.util.{ Success, Failure }
import akka.actor._
import akka.pattern.{ after, ask, pipe }
import akka.util.Timeout
object LogSearch extends App {
@vonwenm
vonwenm / App.java
Last active August 29, 2015 14:22 — forked from yoshi0309/App.java
package yoshida.tika_sample;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.AutoDetectParser;
# Installing Mesos on Docker for Windows
Trying to make Mesos run on a Docker instance on Windows (boot2docker) I've found quite a few issues that I think it can be useful to know about
## Issue #1: Default docker container max size is not enough
Growing a container beyond the 10GB limit is not pretty well documented (at least as this writing) So I've had to make a few steps:
> <b>BE VERY CAREFUL: This process will delete all your existing images/containers. I haven't tryed yet modifying this with existing containers </b>
Starting from the Windows Console you can run:
@vonwenm
vonwenm / client.go
Last active August 29, 2015 14:25 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)

Generated private key

openssl genrsa -out server.key 2048

To generate a certificate

openssl req -new -x509 -key server.key -out server.pem -days 3650

https

@vonwenm
vonwenm / README.markdown
Created January 25, 2016 19:19 — forked from alloy/README.markdown
Learn the LLVM C++ API by example.

The easiest way to start using the LLVM C++ API by example is to have LLVM generate the API usage for a given code sample. In this example it will emit the code required to rebuild the test.c sample by using LLVM:

$ clang -c -emit-llvm test.c -o test.ll
$ llc -march=cpp test.ll -o test.cpp
@vonwenm
vonwenm / RoslynDynamicCompilation.cs
Created March 2, 2016 15:55 — forked from joeriks/RoslynDynamicCompilation.cs
Add a piece of dynamically compiled code in memory with the help of Roslyn. (After this the Greeter class will be available and can be run from example from the immediate window in visual studio).
public static void AddGreeter()
{
AddInmemory("Greeter", @"using System;
class Greeter
{
public string Greet()
{
return ""Hello World"";
}
@vonwenm
vonwenm / USAmap.tex
Created March 8, 2016 21:37 — forked from bordaigorl/USAmap.tex
USA TikZ map
%% Imported from https://upload.wikimedia.org/wikipedia/commons/3/32/Blank_US_Map.svg
%% Translated to TikZ using Inkscape 0.48
\tikzset{USA map/.cd,
state/.style={fill, draw=white, ultra thick},
HI/.style={}, AK/.style={}, FL/.style={}, NH/.style={}, MI/.style={}, MI/.style={}, SP/.style={}, VT/.style={}, ME/.style={}, RI/.style={}, NY/.style={}, PA/.style={}, NJ/.style={}, DE/.style={}, MD/.style={}, VA/.style={}, WV/.style={}, OH/.style={}, IN/.style={}, IL/.style={}, CT/.style={}, WI/.style={}, NC/.style={}, DC/.style={}, MA/.style={}, TN/.style={}, AR/.style={}, MO/.style={}, GA/.style={}, SC/.style={}, KY/.style={}, AL/.style={}, LA/.style={}, MS/.style={}, IA/.style={}, MN/.style={}, OK/.style={}, TX/.style={}, NM/.style={}, KS/.style={}, NE/.style={}, SD/.style={}, ND/.style={}, WY/.style={}, MT/.style={}, CO/.style={}, ID/.style={}, UT/.style={}, AZ/.style={}, NV/.style={}, OR/.style={}, WA/.style={}, CA/.style={}}
\tikzset{
every state/.style={USA map/state/.style={#1}},
HI/.style={USA map/HI/.sty
@vonwenm
vonwenm / nginx-websocket-proxy.conf
Created June 1, 2017 16:24 — forked from uorat/nginx-websocket-proxy.conf
Nginx Reverse Proxy for WebSocket
upstream websocket {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/websocket.access.log main;