Skip to content

Instantly share code, notes, and snippets.

View venkyvb's full-sized avatar

Venki Balakrishnan venkyvb

View GitHub Profile
@venkyvb
venkyvb / sparkJsonSchema
Created February 25, 2023 20:16
FHIRTransactionSchema
root
|-- abatementAge: struct (nullable = true)
| |-- code: string (nullable = true)
| |-- system: string (nullable = true)
| |-- unit: string (nullable = true)
| |-- value: long (nullable = true)
|-- abatementDateTime: string (nullable = true)
|-- abatementString: string (nullable = true)
|-- address: array (nullable = true)
| |-- element: struct (containsNull = true)
@venkyvb
venkyvb / README.md
Created January 13, 2023 16:24 — forked from PawaritL/README.md
Parse nested JSON into your ideal, customizable Spark schema (StructType)

Is Spark's JSON schema inference too inflexible for your liking?

Common Scenarios:

  • Automatic schema inference from Spark is not applying your desired type casting
  • You want to completely drop irrelevant fields when parsing
  • You want to avoid some highly nested fields simply by casting some outer fields as strings

Step 1: Provide your (ideal) JSON data example

REFERENCE_EXAMPLE = {
  "firstName": "Will",
@venkyvb
venkyvb / README.md
Created January 19, 2022 06:51 — forked from felixhammerl/README.md
Write TLS keys system-wide in macOS via SSLKEYLOGFILE and launchd
  1. Put tlskeylogger.plist at ~/Library/LaunchAgents/tlskeylogger.plist
  2. launchctl load ~/Library/LaunchAgents/tlskeylogger.plist, so it will load on the next restart
  3. launchctl start ~/Library/LaunchAgents/tlskeylogger.plist, so it will load the environment variable immediately
  4. Restart your browser(s)
  5. See how TLS keys are being written to ~/.tlskeyfile via tail -f ~/.tlskeyfile
@venkyvb
venkyvb / main.go
Created December 14, 2020 23:30 — forked from julz/main.go
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@venkyvb
venkyvb / flow.md
Last active July 31, 2020 16:26
Using Microsoft Graph Excel API for calculations
@venkyvb
venkyvb / alternative.go
Last active July 12, 2020 05:39 — forked from montanaflynn/pget.go
Bounded Parallel Get Requests in Golang
package main
import (
"fmt"
"sync"
)
const maxConcurrency = 5 // Max number of concurrency
func doSomething(a int) {
@venkyvb
venkyvb / GitCommitEmoji.md
Created September 24, 2019 05:04 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@venkyvb
venkyvb / GitHub-Forking.md
Created June 2, 2019 17:39 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@venkyvb
venkyvb / BUILD
Created April 10, 2019 21:27 — forked from Zetten/BUILD
Bazel spring-boot jar
java_binary(
name = "spring_boot_packager",
srcs = ["src/SpringBootPackager.java"],
main_class = "src.SpringBootPackager",
visibility = ["//visibility:public"],
deps = ["//third_party/java:org_springframework_boot_spring_boot_loader_tools"],
)
@venkyvb
venkyvb / build.gradle
Created April 10, 2019 21:27 — forked from Zetten/build.gradle
Bazel workspace generation script
plugins {
id "com.github.ben-manes.versions" version "0.17.0"
id "io.spring.dependency-management" version "1.0.5.RELEASE"
id "com.github.jk1.dependency-license-report" version '1.0'
}
apply plugin: 'base'
group = 'com.example'
version = '0.0.0'