Skip to content

Instantly share code, notes, and snippets.

@LuboVarga
LuboVarga / AnnotatedBeanLocator.java
Last active March 15, 2018 09:08 — forked from digulla/AnnotatedBeanLocator.java
Locate beans in an ApplicationContext by annotation on the method which defines the bean.
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.type.StandardMethodMetadata;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
@LuboVarga
LuboVarga / github-proxy-ssh-tunnel-howto.md
Created April 18, 2018 07:54 — forked from Kagami/github-proxy-ssh-tunnel-howto.md
Using github through SSH tunnel
# Prerequisites: netcat-openbsd (BSD version of netcat)
$ ssh -fND 127.0.0.1:8081 user@<your-vps>
$ git config --global url."https://github".insteadOf git://github
$ git config --global http.proxy 'socks5://127.0.0.1:8081'
$ echo -e 'Host github.com\nProxyCommand nc -x 127.0.0.1:8081 %h %p' >> ~/.ssh/config

Alternative solutions: