This file contains hidden or 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
| #!/usr/bin/env bash | |
| pid= | |
| loop=1 | |
| cleanup() { | |
| echo "cleaning up..." | |
| loop= | |
| if [ $pid ]; then kill $pid; fi | |
| } |
This file contains hidden or 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.springframework.context.MessageSource; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; | |
| @Configuration | |
| public class BeanConfig { | |
| @Bean | |
| public MessageSource messageSource() { |
This file contains hidden or 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
| # from Wireguard for Android (https://github.com/ViRb3/wgcf/issues/42) | |
| AllowedIPs = 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, ::/0, 193.138.218.74/32 | |
This file contains hidden or 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 com.querydsl.core.types.EntityPath; | |
| import com.querydsl.sql.RelationalPath; | |
| import com.querydsl.sql.RelationalPathBase; | |
| import javax.persistence.Table; | |
| import java.lang.reflect.AnnotatedElement; | |
| import java.util.Objects; | |
| import java.util.concurrent.ConcurrentHashMap; | |
| import java.util.concurrent.ConcurrentMap; |
This file contains hidden or 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
| /* | |
| usage: cy.frameLoaded('#myFrame') | |
| */ | |
| Cypress.Commands.add('frameLoaded', (selector, timeout) => { | |
| const sleep = timer => new Promise(go => setTimeout(go, timer)), | |
| log = Cypress.log({name: 'loaded', | |
| message: [selector] | |
| }).snapshot() | |
| return cy.get(selector, nolog).then({ timeout: isNaN(+timeout) ? 10000 : +timeout }, async ($frame) => { |
This file contains hidden or 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.apache.http.*; | |
| import org.apache.http.auth.AuthScope; | |
| import org.apache.http.auth.UsernamePasswordCredentials; | |
| import org.apache.http.client.ClientProtocolException; | |
| import org.apache.http.client.CredentialsProvider; | |
| import org.apache.http.client.ResponseHandler; | |
| import org.apache.http.client.config.RequestConfig; | |
| import org.apache.http.client.config.RequestConfig.Builder; | |
| import org.apache.http.client.entity.UrlEncodedFormEntity; |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <PropertyGroup> | |
| <NodeCli Condition=" '$(NodeCli)'=='' ">npm</NodeCli> | |
| <PostCssRunner Condition=" '$(PostCssRunner)'=='' ">run postcss --</PostCssRunner> | |
| <PostCssCli Condition="('$(PostCssCli)'=='' Or '$(PostCssCli)'=='true')">-o</PostCssCli> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <PostCssFiles Include="$(MSBuildProjectDirectory)\**\*.pcss" Condition="!($([System.String]::Copy(%(Filename)).StartsWith('_')))" > |
This file contains hidden or 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
| public class ListenableFutureUtils { | |
| public static <T> ListenableFuture<List<T>> allOf(final List<? extends ListenableFuture<? extends T>> futures) { | |
| // we will return this ListenableFuture, and modify it from within callbacks on each input future | |
| final SettableListenableFuture<List<T>> groupFuture = new SettableListenableFuture<>(); | |
| // use a defensive shallow copy of the futures list, to avoid errors that could be caused by | |
| // someone inserting/removing a future from `futures` list after they call this method | |
| final List<? extends ListenableFuture<? extends T>> futuresCopy = new ArrayList<>(futures); | |
| // Count the number of completed futures with an AtomicInt (to avoid race conditions) |
This file contains hidden or 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 java.beans.Introspector; | |
| import java.beans.PropertyDescriptor; | |
| import java.lang.invoke.*; | |
| import java.lang.reflect.Method; | |
| import java.util.LinkedHashMap; | |
| import java.util.LinkedHashSet; | |
| import java.util.Map; | |
| import java.util.Set; | |
| import java.util.function.BiConsumer; |
This file contains hidden or 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 your.logging.util; | |
| import ch.qos.logback.classic.Level; | |
| import ch.qos.logback.classic.spi.ILoggingEvent; | |
| import ch.qos.logback.core.boolex.EventEvaluatorBase; | |
| import org.springframework.expression.EvaluationException; | |
| import org.springframework.expression.Expression; | |
| import org.springframework.expression.ExpressionParser; | |
| import org.springframework.expression.ParseException; | |
| import org.springframework.expression.spel.standard.SpelExpressionParser; |