$ kubectl apply -f - <<EOF
<-- insert YAML content here -->
EOF
OR
$ cat file.yaml | kubectl apply -f -
$ kubectl apply -f - <<EOF
<-- insert YAML content here -->
EOF
OR
$ cat file.yaml | kubectl apply -f -
package com.github.gist.it; | |
import java.net.InetSocketAddress; | |
import java.net.Socket; | |
public class NetUtils { | |
/** | |
* check if a given server is listening on a given port in the limit of timeoutMs | |
* @param serverHost server hostname (or ip) |
This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// see build.gradle for imports | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import ch.qos.logback.classic.LoggerContext; | |
import ch.qos.logback.core.util.StatusPrinter; | |
... | |
public abstract class Utilities { | |
public static final Logger logger = LoggerFactory.getLogger( "AnyUniqueStringHere" ); | |
... | |
public static void printLoggerState() { |
#!/bin/bash | |
tmup () | |
{ | |
echo -n "Updating to latest tmux environment..."; | |
export IFS=","; | |
for line in $(tmux showenv -t $(tmux display -p "#S") | tr "\n" ","); | |
do | |
if [[ $line == -* ]]; then | |
unset $(echo $line | cut -c2-); |