Skip to content

Instantly share code, notes, and snippets.

View zhelyan's full-sized avatar
🌶️
.

Zhelyan zhelyan

🌶️
.
View GitHub Profile
@zhelyan
zhelyan / cdk_json_diff.py
Created July 13, 2023 13:47
diff encoded json strings in the cdk diff output
#!/usr/bin/env python
import json
import re
import difflib
import sys
from typing import TextIO
import yaml
"""
@zhelyan
zhelyan / configuration.yaml
Last active January 3, 2023 22:10
use microbit as temp sensor in home assistant
# HAAS config
sensor:
- platform: serial
serial_port: /dev/ttyACM0 # on HASSOS
baudrate: 115200
template:
- sensor:
- name: microbit_temperature
unique_id: microbit_temperature
@zhelyan
zhelyan / upload_mensa_events.rb
Last active March 13, 2020 17:56
upload_mensa_events.rb
# frozen_string_literal: true
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'watir'
gem 'webdrivers'
gem 'byebug'
@zhelyan
zhelyan / lucidchart_mindmap_csv_shapes_to_dot.rb
Created February 21, 2020 16:28
lucidchart_mindmap_csv_shapes_to_dot.rb
# frozen_string_literal: true
# /usr/local/bin/env ruby
# converts Lucidchart mindmaps
# exported as "CSV of shape data" to DOT format
# Usage: ./lucidchart_mindmap_csv_shapes_to_dot.rb <path_to_exported_file.csv>
require "bundler/inline"
gemfile do
@zhelyan
zhelyan / glue.scala
Created May 2, 2019 17:35
Delete Hadoop temp "<xyz>_$folder$" files in S3 from a Glue / Spark job
import scala.collection.JavaConverters._
import com.amazonaws.services.s3.AmazonS3ClientBuilder
import com.amazonaws.services.s3.model.{DeleteObjectsRequest, ListObjectsRequest}
object GlueApp {
private lazy val s3 = AmazonS3ClientBuilder.defaultClient()
def main(sysArgs: Array[String]) {
// etl code

Keybase proof

I hereby claim:

  • I am zhelyan on github.
  • I am zhelyan (https://keybase.io/zhelyan) on keybase.
  • I have a public key whose fingerprint is 8DC5 0E56 EE7B CED5 63FE 5BF3 3EDE 5221 D005 A8FD

To claim this, I am signing this object: