Skip to content

Instantly share code, notes, and snippets.

View sirianni's full-sized avatar

Eric Sirianni sirianni

View GitHub Profile
@sirianni
sirianni / Main.java
Last active October 5, 2016 19:56
Vertica Timestamp JDBC Bug
package adhoc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.Timestamp;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
@sirianni
sirianni / script.sh
Last active December 13, 2016 20:56
Elasticsearch Query to CSV
curl -v --data @query.json http://localhost:9200/myindex/_search \
| jq --compact-output --raw-output \
'.hits.hits[] | ._source | [.["@timestamp"], .user.login, .user.accountName, .user.class, .user.accountType, .request.urlPath] | @csv'
@sirianni
sirianni / intellij-monokai-theme.icls
Last active August 3, 2017 19:15 — forked from darekkay/intellij-monokai-theme.xml
Monokai Theme for JetBrains IDEs (IntelliJ IDEA, Webstorm, PhpStorm, PyCharm etc.)
<scheme name="Monokai" version="142" parent_scheme="Default">
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Consolas" />
<colors>
<option name="ADDED_LINES_COLOR" value="295622" />
<option name="ANNOTATIONS_COLOR" value="b2c0c6" />
<option name="CARET_COLOR" value="bbbbbb" />
<option name="CARET_ROW_COLOR" value="" />
<option name="CONSOLE_BACKGROUND_KEY" value="2b2b2b" />
<option name="FILESTATUS_ADDED" value="629755" />
@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
@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
<!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 / 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
@sirianni
sirianni / logic.md
Created March 5, 2020 15:16
Kubernetes pod deletion logic for scale down

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 / 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