Skip to content

Instantly share code, notes, and snippets.

View sirianni's full-sized avatar

Eric Sirianni sirianni

View GitHub Profile
# https://gist.github.com/sirianni/0b4bdac87e62bf136bfa71828827ca43
import os
import shutil
import time
for filename in os.listdir():
if os.path.isfile(filename):
@sirianni
sirianni / README.md
Last active March 11, 2024 13:06
Datadog OTel Gauge Issue
@sirianni
sirianni / readme.md
Created January 29, 2022 14:43
Set log4j levels via Jolokia
$ http ':7777/jolokia/write/org.apache.logging.log4j2:component=Loggers,name=io.opentelemetry,type=251a69d7/Level/INFO'
HTTP/1.1 200 OK

{
    "request": {
        "attribute": "Level",
        "mbean": "org.apache.logging.log4j2:component=Loggers,name=io.opentelemetry,type=251a69d7",
        "type": "write",
 "value": "INFO"
@sirianni
sirianni / README.md
Last active January 14, 2022 19:21
Protobuf Descriptor Sets

Protobuf Descriptor Sets

Example use

Using grpcurl and ZSH process substitution =()

$ grpcurl -protoset =(curl -L https://gist.github.com/sirianni/d8379a2c9a5768acb7682f138c9c55af/raw/opentelemetry.fdset) list
opentelemetry.proto.collector.logs.v1.LogsService
opentelemetry.proto.collector.metrics.v1.MetricsService

Keybase proof

I hereby claim:

  • I am sirianni on github.
  • I am sirianni (https://keybase.io/sirianni) on keybase.
  • I have a public key whose fingerprint is 3E6F 5221 5D8D 6D7F 5CF4 C4E4 D596 D4D7 61C6 9F8F

To claim this, I am signing this object:

@sirianni
sirianni / logic.md
Created March 5, 2020 15:16
Kubernetes pod deletion logic for scale down
@sirianni
sirianni / report.html
Created August 2, 2019 13:00
Zstd 1.4.0-1 vs. 1.4.2-1 compatability report
<!-- kind:binary;verdict:compatible;affected:0;added:27;removed:0;type_problems_high:0;type_problems_medium:0;type_problems_low:0;method_problems_high:0;method_problems_medium:0;method_problems_low:25;checked_methods:173;checked_types:10;tool_version:2.4 -->
<!-- kind:source;verdict:compatible;affected:0;added:27;removed:0;type_problems_high:0;type_problems_medium:0;type_problems_low:0;method_problems_high:0;method_problems_medium:0;method_problems_low:0;checked_methods:173;checked_types:10;tool_version:2.4 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="keywords" content="zstd-jni, compatibility" />
<meta name="description" content="Compatibility report for the zstd-jni library between 1.4.0-1 and 1.4.2-1 ver
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script id="jsbin-javascript">
@sirianni
sirianni / Makefile
Created April 15, 2019 14:23
Binary Search Tree SerDe in C++
run: main
./a.out
main: main.cpp
g++ -g -Wall main.cpp
clean:
rm -f a.out
@sirianni
sirianni / organize.sh
Created August 20, 2017 00:07
Organize files into subdirectories by year
#!/bin/bash
for f in `ls -p | grep -v /`; do
file="$f"
modtime=`stat --format=%Y "$file"`
year=`date --date @$modtime +%Y`
if [ ! -d "$year" ]; then
mkdir -p "$year"
fi