Skip to content

Instantly share code, notes, and snippets.

View saulius's full-sized avatar
:octocat:
java.lang.OutOfMemoryError

Saulius Grigaliunas saulius

:octocat:
java.lang.OutOfMemoryError
View GitHub Profile
@vivek-balakrishnan-rovio
vivek-balakrishnan-rovio / druid_segment_cleanup.py
Created February 18, 2022 10:54
Script to clean overshadowed segments from Metadata and Deep Storage
#
# Copyright 2021 Rovio Entertainment Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@vivek-balakrishnan-rovio
vivek-balakrishnan-rovio / druid_ingest.py
Last active February 16, 2024 08:21
Pyspark script to ingest Hive table to Druid using rovio-ingest library
#
# Copyright 2021 Rovio Entertainment Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@stettix
stettix / things-i-believe.md
Last active November 2, 2024 12:21
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active November 5, 2024 06:27
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@rcillo
rcillo / attach-eni.py
Last active May 30, 2019 15:13
This gist contains code that attaches an ENI to a running EC2 instance and configures the network accordingly
# -*- coding: utf-8 -*-\
"""
The MIT License (MIT)
Copyright (c) 2015 Zalando SE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
scala> class Parent { def f = this }
defined class Parent
scala> class Child extends Parent { def newF = this }
defined class Child
scala> val c = new Child
c: Child = Child@5b966ac7
scala> c.newF
@gyribeiro
gyribeiro / tmux_italic.md
Last active October 6, 2024 18:56
enable italic font on tmux
@mdonkers
mdonkers / server.py
Last active November 2, 2024 09:51
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@bdmorin
bdmorin / reverse_sshfs.md
Created March 23, 2017 21:29
reverse sshfs

2014-07-14 Reverse SSHFS mounts (fs push) https://blog.dhampir.no/content/reverse-sshfs-mounts-fs-push

sshfs is a neat way of mounting a file system from one machine to another over an encrypted ssh channel. However, for machine CLIENT to access a file system that resides on machine HOST, CLIENT must generally be able to log in to HOST. In addition, CLIENT must be able to connect to HOST in the first place, though a tunnel from HOST to CLIENT can easily mediate this if a connection can only be initiated in that direction.

However, the login itself may still be an issue. You might not want to type your password for HOST on CLIENT, or set up a keyless login using public/private keys. You might not entirely trust CLIENT, from which you want to access the file system. dpipe to the rescue.

Using dpipe, available in the “vde2” package on Debian (and, likely, derivatives), you can initiate the connection the other way and use sshfs in “slave mode”, in which it communicates over standard input and output instead o