Skip to content

Instantly share code, notes, and snippets.

@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
@evanwill
evanwill / gitBash_windows.md
Last active May 13, 2024 04:59
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@TheBigBear
TheBigBear / ReadMe.md
Last active February 8, 2023 10:53
get a file from web URL and figure out it's filename

I am trying to get a powershell script that I can call with one (or two) params.

Ideally I would like to pass only one paramter, the $Url and expect the script to figure out the filename and then download to that filename.

IF it does not figure out a filename, I can optionally pass a second parameter the $FolderPath

# get-FileFromUri.ps1
function get-FileFromUri {
  param(
@orenbenkiki
orenbenkiki / enhanced_extension.ex
Last active February 21, 2022 22:29
Elixir module inheritance
defmodule Extension do
defmacro extends(module) do
# As above...
end
defmacro implements(module, protocol: protocol) do
quote do
defimpl unquote(protocol), for: unquote(module) do
import Extension
@hoffstein
hoffstein / Default (Windows).sublime-keymap
Created July 18, 2011 15:08
Sublime Text 2 script to open the current file's parent directory in Windows Explorer
[
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_explorer" }
]