PetTypes:
type: string
description: What animal might be a pet
enum:
- cat
- dog
- tourtile
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
@Entity | |
public class Employee { | |
@Id | |
@GeneratedValue | |
private Long id; | |
@JsonView(SummaryView.class) | |
private String name; |
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 java.util.*; | |
import java.util.stream.Collectors; | |
import io.swagger.v3.core.util.RefUtils; | |
import io.swagger.v3.oas.models.media.JsonSchema; | |
import io.swagger.v3.oas.models.media.Schema; | |
import lombok.Getter; | |
import lombok.Setter; | |
import org.jooq.lambda.Seq; | |
import org.jooq.lambda.tuple.Tuple; |
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
find ~/.m2 -name "*.lastUpdated" \ | |
-exec grep -q "Could not transfer" {} \; \ | |
-print \ | |
-exec rm {} \; |
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
fun List<Int>.allNonZero() = all { it != 0 } | |
fun List<Int>.allNonZero1() = none { it == 0 } | |
fun List<Int>.allNonZero2() = !any { it == 0 } | |
fun List<Int>.containsZero() = any { it == 0 } | |
fun List<Int>.containsZero1() = !all { it != 0 } | |
fun List<Int>.containsZero2() = !none { it == 0 } | |
fun main(args: Array<String>) { | |
val list1 = listOf(1, 2, 3) |
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.cpm; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
import java.util.Locale; | |
import java.util.PropertyResourceBundle; |
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
#!/usr/bin/env bash | |
XCONF_PROP="xfconf-query -c xfce4-keyboard-shortcuts -p" | |
RST="-r" | |
while IFS= read -r line; do | |
eval "$XCONF_PROP" "\"$line\"" "$RST"; | |
done <<'EOF' | |
/xfwm4/custom/<Alt>Insert | |
/xfwm4/custom/<Alt>Delete |
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
#!/usr/bin/env bash | |
# files with prop keys on each line | |
KEYS_FILE="/path/to/result.list" | |
# Extract keys to file | |
awk -F = '/^[a-z_.]+=/ { print $1 }' /some/path/files > "$KEYS_FILE" | |
# path to some repo | |
SEARCH_PATH="/path/to/repo" |
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
printf '%s\n' "$NEW_IDS" | ssh "$@" " | |
umask 077 ; | |
mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ; | |
if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" |
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
def tmpl = { | |
""" | |
<appender name="${it.toUpperCase()}_FILE" | |
additivity="false" | |
class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>\${LOG_PATH}/${it.toLowerCase()}.log</file> | |
<encoder><pattern>\${FILE_LOG_PATTERN}</pattern></encoder> | |
<append>true</append> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>\${LOG_PATH}/old/${it.toLowerCase()}_%d{yyyy-MM-dd, aux}/${it.toLowerCase()}.%d{yyyy-MM-dd-HH}.gz</fileNamePattern> |
NewerOlder