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
apiVersion: flink.apache.org/v1beta1 | |
kind: FlinkDeployment | |
metadata: | |
name: cluster | |
namespace: flink | |
spec: | |
image: flink:1.18.1-java17 | |
flinkVersion: v1_19 | |
flinkConfiguration: | |
taskmanager.numberOfTaskSlots: "2" |
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 sekaiser; | |
import org.springframework.stereotype.Component; | |
import java.util.Locale; | |
import java.util.concurrent.ThreadLocalRandom; | |
@Component | |
public final class UsernameGenerator { | |
private static final String[] ADJECTIVES; |
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
# display VPC ID, CIDR Block and Name | |
aws ec2 --output text --query 'Vpcs[*].{VpcId:VpcId,Name:Tags[?Key==`Name`].Value|[0],CidrBlock:CidrBlock}' describe-vpcs | |
# display VPC ID, IPv6 CIDR Block and Name\ | |
aws ec2 describe-vpcs --query 'Vpcs[*].{VpcId:VpcId,Name:Tags[?Key==`Name`].Value|[0],Ipv6CidrBlock:Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock}' |
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 | |
set -euo pipefail | |
if [ $# -eq 0 ]; then | |
pom_file="pom.xml" | |
else | |
pom_file=$1 | |
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
# sort a pom (https://github.com/Ekryd/sortpom) | |
mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -Dsort.keepBlankLines -Dsort.predefinedSortOrder=custom_1 |
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
# Dasel | |
https://github.com/TomWright/dasel#property | |
# Select dependency by groupId | |
go run github.com/tomwright/dasel/cmd/ put object -f pom.xml -p xml '.project.dependencies.dependency.(groupId=org.assertj)' | |
# Append a new dependency | |
go run github.com/tomwright/dasel/cmd/ put object -f pom.xml -s '.project.dependencies.dependency.[]' -t string "groupId=some.groupId" -t string "artifactId=some.artifactId" -t string "version=1.0.0" |
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
macro_rules! from { | |
($(@$f: ident | |
$( ?> $i1: ident = $e1: tt )* | |
$( => $t: ident )* | |
$( -> $i2: ident = $e2: tt )* )*) => ( | |
$($( | |
impl <'g> From<$f<'g>> for $t<'g> { | |
fn from(f: $f<'g>) -> Self { | |
Self { | |
request: f.request, |
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
# Foundations | |
A startup's mission is the search of a business model that is repeatable and | |
scalable. The search for such a business model must follow the scientific method, | |
which is based on one or several testable hypotheses and the empirical | |
validation of such hypotheses through experiments and result analysis. | |
If the company succeeds in defining such a business model, it is considered a | |
success. If it fails, the organization may cease to exist. | |
As failing may cause the end of the organization, the startup is under immense | |
pressure to quickly iterate upon ideas, gain relevant knowledge and to define |
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
--- utility | |
/** | |
* Ensure to properly deal with default props in React.Component | |
*/ | |
export const createPropsGetter = <DP extends object>(defaultProps: DP) => { | |
return <P extends Partial<DP>>(props: P) => { | |
// extract default props from component Props and type | |
type PropsExcludingDefaults = Pick<P, Exclude<keyof P, keyof DP>>; |