Skip to content

Instantly share code, notes, and snippets.

View piotrklibert's full-sized avatar

Piotr Klibert piotrklibert

View GitHub Profile
golden_ratio = 0x9E3779B9
max_int = 2**32 - 1
def rotate_left_5(value):
return ((value << 5) | (value >> 27)) & max_int
def add_to_hash(hash_value, value):
return (golden_ratio * (rotate_left_5(hash_value) ^ value)) & max_int
def hash_simple(url):
@davideicardi
davideicardi / README.md
Last active April 23, 2023 01:13
Gradle minimal multi-projects scala build

Gradle multi-projects scala build

Assume that you have the following directory structure:

  • your-app
    • project1
      • src
        • main
          • scala
  • App.scala