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: batch/v1 | |
kind: Job | |
metadata: | |
generateName: echo-job- | |
spec: | |
template: | |
spec: | |
containers: | |
- name: echo | |
image: alpine:latest |
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.nio.ByteBuffer; | |
// is a byte[] under the hood | |
ByteBuffer buffer1 = ByteBuffer.allocate(12); | |
// is a block of bytes (similar to malloc) | |
ByteBuffer buffer2 = ByteBuffer.allocateDirect(12); | |
// buffers have a "position" that is advanced by read/write operations | |
buffer1.put((byte)1).put((byte)2).put((byte)3).put((byte)4); |
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 | |
echo $(( ($(date -j -f "%d %B %Y" "$(cal -N -e)" +%s) - $(date +%s)) / (24 * 60 * 60) )) days until the Easter bunny comes |
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
defmodule BugsnagLoggerBackend do | |
@behaviour :gen_event | |
@impl true | |
def init(__MODULE__) do | |
{:ok, %{}} | |
end | |
@impl true | |
def handle_call({:configure, _options}, state) do |
OlderNewer