Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#### Add following lines to your shell rc file (.zshrc .bashrc)
# ${HOME}/.local/libexec/wsl-ssh-agent-relay start
# export SSH_AUTH_SOCK=${HOME}/.ssh/wsl-ssh-agent.sock
# For debugging startup problems uncomment next line
# exec 2> >(tee -a -i "$HOME/error.log")
#### Assuming ~/winhome links to %USERPROFILE on Windows side
package main
import (
"github.com/elazarl/goproxy"
"log"
"net/http"
"strings"
)
func onSWCall(req *http.Request, resp *http.Response) {
# Generated by YCM Generator at 2016-03-24 15:30:34.198292
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
@skroll
skroll / ngx_x509rfc2253_module.c
Created March 24, 2016 18:58
Example module of getting the SSL Subject/Issuer DN is RFC 2253 format
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
typedef ngx_int_t (*ngx_x509rfc2253_variable_handler_pt)(ngx_connection_t *c,
ngx_pool_t *pool, ngx_str_t *s);
static ngx_int_t ngx_x509rfc2253_variable(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data);
static ngx_int_t ngx_x509rfc2253_add_variables(ngx_conf_t *cf);
package com.github.skroll
public abstract class AbstractFoo<K, V> : Map<K, V> {
override operator fun get(key: K): V? {
println("AbstractFoo")
return null
}
override val size: Int
get() = throw UnsupportedOperationException()
public abstract class AbstractFoo<K, V> : kotlin.Map<K, V> {
override operator fun get(key: K): V? {
println("AbstractFoo")
return null
}
override val size: Int
get() = throw UnsupportedOperationException()
override fun isEmpty(): Boolean {
@skroll
skroll / 0001-llvm-libs.patch
Created October 10, 2014 16:07
sparse 5.0 patch to fix builds when llvm is on system
--- a/Makefile
+++ b/Makefile
@@ -87,6 +87,7 @@
LLVM_LDFLAGS := $(shell llvm-config --ldflags)
LLVM_CFLAGS := $(shell llvm-config --cflags | sed -e "s/-DNDEBUG//g")
LLVM_LIBS := $(shell llvm-config --libs)
+LLVM_LIBS += $(shell llvm-config --system-libs 2>/dev/null)
PROGRAMS += $(LLVM_PROGS)
INST_PROGRAMS += sparse-llvm sparsec
sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
@skroll
skroll / open-vm-tools-2013.09.16-1328054-compat_d_count.patch
Created July 10, 2014 21:14
Patches to get open-vm-tools-2013.09.16-1328054 vmhgfs kernel module to compile and work on 3.15
diff --git a/modules/linux/shared/compat_dcache.h b/modules/linux/shared/compat_dcache.h
index 0450aee..a38c861 100644
--- a/modules/linux/shared/compat_dcache.h
+++ b/modules/linux/shared/compat_dcache.h
@@ -48,4 +48,15 @@
})
#endif
+/*
+ * d_count field was removed in 3.11.0.