Skip to content

Instantly share code, notes, and snippets.

Anatoli avk2

  • Spain
Block or report user

Report or block avk2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c2ac092d4146a0560eef7d66c55f6776
class foo {
FooPK pk;
class fooPK {
Long id1;
Long id2;
View gist:e48849749891d57efc802f9f932cd575
JPAQuery<ServicioResumenProj> query = jpaQueryFactory
View gist:ad5786cccd95e813d920116e784832e0
public interface ServicioResumen {
ServicioPK getPk();
Servicio.Estado getEstado();
ZonedDateTime getFechaHoraAlta();
ZonedDateTime getFechaHoraPrevistaEnvioAmbulancia();
ViajeId getViaje();
PacienteResumen getPaciente();
Zona getZona();
PlantillaId getPlantilla();
View gist:e2a94e852ad65ff33f4874b74ec90eec
public class JacksonConfig {
public Module customSerializer() {
SimpleModule module = new SimpleModule();
module.addSerializer(new NullSerializer());
return module;
View gist:ee332737e6ab578f0c29cdf4717adb89
//@EnableGlobalMethodSecurity //not sure which one to use
public class SecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception {
// http.authorizeRequests()
// .antMatchers("/login**").permitAll()
// .anyRequest().authenticated();
View gist:c0f27f0286d64429ec6ce43b60621e70
private void setActiveUser(User user, HttpServletRequest request) {
try {
// Must be called from request filtered by Spring Security, otherwise SecurityContextHolder is not updated
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(user, null);
token.setDetails(new WebAuthenticationDetails(request));
Authentication authentication = authenticationProvider.authenticate(token);
log.debug("Current user [{}]", authentication.getPrincipal());
} catch (Exception e) {
View gist:cd091a19bcbe6d82e392542e17a79fda
public class CustomAuthenticationProvider implements AuthenticationProvider {
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
return authentication;
public boolean supports(Class<?> aClass) {
View gist:a91d93688dff59ca4b9d24882b3c851b
public class CustomDBAppender extends AppenderBase<ILoggingEvent> {
private final FooRepo fooRepo;
public CustomDBAppender(FooRepo fooRepo) {
this.fooRepo = fooRepo;
View gist:9886ad701cadc42297984ccca0c4cdf4
ERROR: object '/home/ender/.local/share/Steam/ubuntu12_32/' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/bin/sh: 1: /home/ender/.local/share/Steam/steamapps/common/BATTALION 1944 TEST ZONE/Battalion: Permission denied
>>> Adding process 12494 for game ID 640100
GameAction [AppID 640100, ActionID 1] : LaunchApp changed task to WaitingGameWindow with ""
>>> Adding process 12495 for game ID 640100
GameAction [AppID 640100, ActionID 1] : LaunchApp changed task to Completed with ""
Game removed: AppID 640100 "", ProcID 12494
No cached sticky mapping in ActivateActionSet.
View .js
// query
"key" : "value"
// update
You can’t perform that action at this time.