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
function! s:ParseSerial() | |
"Search for a line that start with a year and contains the word Serial | |
let numberOfLine = search('\(19\|20\)\d\d\(0[1-9]\|1[012]\)\(0[1-9]\|[12][0-9]\|3[01]\)\d\d.*[Ss]erial.*') | |
if numberOfLine == 0 | |
echo "No bind serial found ! so not updating the file" | |
return { 'lineNo': 0 } | |
else | |
"Get the line contents | |
let line = getline(numberOfLine) | |
"Extract the serial number |
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
$ ./procsubtest.sh | |
Bash version: 4.3.33(1)-release | |
grep: /dev/fd/63: No such file or directory | |
grep: /dev/fd/63: No such file or directory | |
grep: /dev/fd/63: No such file or directory | |
grep: /dev/fd/63: No such file or directory | |
grep: /dev/fd/63: No such file or directory |
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
/** | |
* This class demonstrates that Eclipse 4.4.2 for some reason does not recognize | |
* that the Scala singleton object for the class Implementor does in fact | |
* implement the interface Interface<String>. | |
* | |
* Instead, it shows the error markers mentioned in the comments. | |
* | |
* However, the code compiles fine (by the Eclipse compiler!), and in fact | |
* running this class' main method prints: | |
* |
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
/** | |
* given super-class from a 3rd-party library | |
*/ | |
abstract class AbstractSuperClass<T extends AbstractParamClass> { | |
// ... | |
abstract static class AbstractParamClass { | |
// ... | |
} | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am oxc on github. | |
* I am oxc (https://keybase.io/oxc) on keybase. | |
* I have a public key whose fingerprint is 40AE 603D C8D7 AD42 4A99 74DC FCD4 D949 FB8E 2709 | |
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
# create and refresh dh params | |
define profile::security::dhparams( | |
String $path = $name, | |
Integer $length, | |
$recreate_after = null, | |
Boolean $selinux = false, | |
$owner = 'root', | |
$group = 0, | |
) { | |
$tmpfile = "${dirname($path)}/.puppet-${basename($path)}" |
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
If a (java) project depends on two kotlin-multiplatform libraries that depend on each other, | |
this causes strange behaviour when importing the project in IntelliJ IDEA: the java-project | |
classpath gets a compile entry containing two jar files, pointing to the gradle build path | |
of the two libraries' jars (see `issue-jar-dependency.png`). | |
If the transitive dependency is comment out in the java-project dependencies, it gets imported | |
correctly, even though the transitive dependency is marked as "implementation" in the other | |
libary (see `issue-module-dependencies.png`). |
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 python3 | |
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python | |
# This file is part of Supermicro IPMI certificate updater. | |
# Supermicro IPMI certificate updater is free software: you can | |
# redistribute it and/or modify it under the terms of the GNU General Public | |
# License as published by the Free Software Foundation, version 2. | |
# | |
# This program is distributed in the hope that it will be useful, but WITHOUT |
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 de.classyfi.session; | |
import java.time.Duration; | |
import java.time.Instant; | |
import java.util.Set; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
import org.springframework.context.ApplicationEvent; | |
import org.springframework.context.ApplicationEventPublisher; |
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
/** | |
* Constructs a new set containing the elements in the specified collection. | |
* The {@code HashMap} is created with default load factor (0.75) and an initial | |
* capacity sufficient to contain the elements in the specified collection. | |
*/ | |
public HashSet(Collection<? extends E> c) { | |
map = new HashMap<>(Math.max((int) (c.size()/.75f) + 1, 16)); | |
addAll(c); | |
} |
OlderNewer