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
#!/bin/bash -e | |
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). You | |
# may not use this file except in compliance with the License. A copy of | |
# the License is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# | |
# or in the "license" file accompanying this file. This file is |
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
See, also KUBERNETES-8523, KUBERNETES-8575 and ETCD-1137 |
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
See, also |
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
# Converts between dot.separated.case and SNAKE_CASE (app caps). | |
# dot.separated.case to SNAKE_CASE | |
# | |
# echo 'mysql.user' | dots_to_snake | |
# => MYSQL_USER | |
# | |
alias prop_to_env="tr '[a-z].' '[A-Z]_'" | |
# SNAKE_CASE to dot.separated.case |
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
10 | |
10-ea | |
10-ea-32 | |
10-ea-32-experimental | |
10-ea-32-jdk | |
10-ea-32-jdk-experimental | |
10-ea-32-jdk-slim | |
10-ea-32-jdk-slim-experimental | |
10-ea-32-jre | |
10-ea-32-jre-experimental |
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
# Get window info | |
xwininfo | |
# Save screenshot animation as a PNG format into outputs | |
ffmpeg -video_size $widthx$height -framerate 24 -f x11grab -i :0.0+$x,$y outputs/%04d.png | |
# Generate GIF from PNG images | |
ffmpeg -y -i outputs/%04d.png -ss 2.3 -t 15 -filter_complex "[0:v]setpts=0.7*PTS,split [a][b];[a] palettegen [p];[b][p] paletteuse" screenshot.gif |
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
struct Document<'a> { | |
fields: Vec<Box<Field + 'a>>, | |
} | |
impl<'a> Document<'a> { | |
fn new() -> Document<'a> { | |
Document { fields: Vec::new() } | |
} | |
fn add_field<T>(&mut self, field: T) |
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 main | |
import ( | |
"bufio" | |
"encoding/json" | |
"errors" | |
"fmt" | |
"os" | |
"strings" | |
) |
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
sudo modprobe v4l2loopback | |
ffmpeg -video_size 3840x2160 -framerate 30 -f x11grab -i :0.0 -f v4l2 /dev/video0 |
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 main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"time" | |
"github.com/coreos/etcd/clientv3" | |
) |
NewerOlder