Skip to content

Instantly share code, notes, and snippets.

View fedotxxl's full-sized avatar

Fedor Belov fedotxxl

View GitHub Profile
package ru.gramant.adplanner.auth;
import io.thedocs.soyuz.to;
import lombok.AllArgsConstructor;
import org.jooq.DSLContext;
import org.springframework.security.web.authentication.rememberme.PersistentRememberMeToken;
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;
import org.springframework.stereotype.Repository;
import java.util.Date;
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
<changeSet id="20230213.f1.xml" author="fbelov">
<sql>
CREATE TABLE persistent_logins_with_history (
username VARCHAR(64) NOT NULL,
series VARCHAR(64) NOT NULL,
package ru.gramant.adplanner.auth;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.web.authentication.rememberme.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Date;
import 'package:flutter/widgets.dart';
class PreloadingImageBuilder extends StatefulWidget {
final ImageProvider imageProvider;
final AsyncWidgetBuilder<dynamic> builder;
PreloadingImageBuilder({this.imageProvider, this.builder});
@override
_PreloadingImageBuilderState createState() => _PreloadingImageBuilderState();
import 'package:evtrip/utils/my_future_builder.dart';
import 'package:flutter/widgets.dart';
class MyFutureNullableBuilder extends StatelessWidget {
final Future<bool> future;
final AsyncWidgetBuilder<bool> builder;
MyFutureNullableBuilder({
Key key,
Future<dynamic> future,
import 'package:evtrip/utils/my_future_nullable_builder.dart';
import 'package:flutter/widgets.dart';
class PreloadingImageBuilder extends StatefulWidget {
final ImageProvider imageProvider;
final AsyncWidgetBuilder<dynamic> builder;
PreloadingImageBuilder({this.imageProvider, this.builder});
@override
import {Injectable} from '@angular/core';
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from '@angular/common/http';
import {Observable} from "rxjs";
import {map} from "rxjs/operators";
@Injectable()
export class DateHttpInterceptor implements HttpInterceptor {
// Migrated from AngularJS https://raw.githubusercontent.com/Ins87/angular-date-interceptor/master/src/angular-date-interceptor.js
private static iso8601Date = /^\d{4}-\d\d-\d\d?$/;
private static iso8601DateTime = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/;
import 'package:flutter/widgets.dart';
class MyStreamBuilder<T> extends StatelessWidget {
final T initialData;
final AsyncWidgetBuilder<T> builder;
final Stream<T> stream;
const MyStreamBuilder({
Key key,
server {
listen 80;
server_name your-domain.com;
access_log /var/log/jj-dashboard/nginx.access.log;
error_log /var/log/jj-dashboard/nginx.error.log;
root /opt/adv/jj-dashboard-frontend/;
index index.html index.htm;
//import xml configuration
@ImportResource("classpath:applicationContext.xml")
//import java configuration
@Import({App.Config.class, App.JobsConfig.class})