Preferences -> Editor -> Live Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.powermock.core.classloader.annotations.PrepareForTest | |
import org.powermock.modules.testng.PowerMockObjectFactory | |
import org.testng.IObjectFactory | |
import org.testng.annotations.ObjectFactory | |
import org.testng.annotations.Test | |
import static org.mockito.Mockito.* | |
import static org.powermock.api.mockito.PowerMockito.mockStatic | |
@PrepareForTest(AStaticClass.class) | |
public class SomeTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.jetbrains.kotlin.maven; | |
import org.apache.maven.plugin.AbstractMojo; | |
import org.apache.maven.plugin.MojoExecutionException; | |
import org.apache.maven.plugin.MojoFailureException; | |
import org.apache.maven.plugins.annotations.Mojo; | |
import org.apache.maven.plugins.annotations.Parameter; | |
import org.apache.maven.project.MavenProject; | |
import java.io.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.okta.developer; | |
import io.jsonwebtoken.Claims; | |
import io.jsonwebtoken.Jws; | |
import io.jsonwebtoken.Jwts; | |
import io.jsonwebtoken.security.Keys; | |
import java.time.Instant; | |
import java.time.temporal.ChronoUnit; | |
import java.util.Base64; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
BeanPostProcessor delegateForFoo() { | |
return new WrappingBeanPostProcessor<>(Foo.class, original -> new MyCustomFoo(original)); | |
} | |
public class WrappingBeanPostProcessor<T> implements BeanPostProcessor { | |
private final Class<T> type; | |
private final UnaryOperator<T> beanCreator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on OS X (with a bunch of gnu utils installed) | |
function mvnwarn { | |
tmp_file=$(mktemp $TMPDIR/$(uuidgen).txt) | |
MAVEN_OPTS="-Djansi.force=true" mvn -Dstyle.color=always $@ | tee "${tmp_file}" | |
exit_code=${pipestatus[1]} | |
if [ $exit_code -ne 0 ]; then | |
return 1 | |
fi |
I hereby claim:
- I am bdemers on github.
- I am bdemers (https://keybase.io/bdemers) on keybase.
- I have a public key ASAdBQ7CfzapuguEq6yzQ2Qc6SPObwcWsID5lNAVlXZSigo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.edgeservice | |
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand | |
import org.springframework.boot.SpringApplication | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.web.servlet.FilterRegistrationBean | |
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker | |
import org.springframework.cloud.client.discovery.EnableDiscoveryClient | |
import org.springframework.cloud.netflix.feign.EnableFeignClients | |
import org.springframework.cloud.netflix.feign.FeignClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic usage:<p> | |
* <code> | |
* Environment env = new BasicIniEnvironment("classpath:shiro.ini"); | |
* SecurityManager securityManager = env.getSecurityManager(); | |
* </code> | |
* | |
*/ | |
public class BasicIniEnvironment extends DefaultEnvironment { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[stack@manager ~]$ rpm -qi python-rdomanager-oscplugin | |
Name : python-rdomanager-oscplugin | |
Version : 0.0.0.post52 | |
Release : 2.el7ost | |
[stack@manager ~]$ openstack undercloud install | |
... | |
WARNING: map-packages is deprecated. Please use the pkg-map element. |