Skip to content

Instantly share code, notes, and snippets.

View eloots's full-sized avatar

Eric Loots eloots

  • Wilrijk, Belgium
View GitHub Profile
@eloots
eloots / filter-branch.md
Last active August 29, 2015 14:21
Rewriting git history using filter-branch - excellent use-case for writing a class for a hacking session maintained in git

The code for the Akka Hacking session is maintained in a git repository. The idea is to push the exercises from a private to a public repository used by the attendees.

While writing the code (and README file), mistakes are made, necessitating corrections to the different commits in the repo. Doing this 'manually' is a tedious and error-prone process. This is where git filter-branch comes into play...

See below the way in which the different source files were corrected. It started with a rename of three variables, which turned out to introduce a name clash. This in turn was corrected with further edits.

Of course, don't do this on your working copy of the repo. Instead:

- Clone the repo and remove the *remote(s)*
@eloots
eloots / koanToStudentifiedRepoConversion.md
Last active January 24, 2017 18:53
Procedure to convert a koan based repo to a studentified style master repo

Note that in the this gist assumes that the following git aliases are in place:

        show-graph = log --graph --abbrev-commit --pretty=oneline
        co = checkout
        br = branch
        cm = commit
        st = status
        rb = rebase
        cp = cherry-pick

Keybase proof

I hereby claim:

  • I am eloots on github.
  • I am eloots (https://keybase.io/eloots) on keybase.
  • I have a public key ASCClPO5_qLRsDmMtlQlVjFk4JGWLyrS3Nx4boMcdstW_Qo

To claim this, I am signing this object:

@eloots
eloots / docker.md
Last active July 2, 2019 09:08
Docker quick reference

Show docker images

$ docker images
REPOSITORY                                                                                          TAG                 IMAGE ID            CREATED             SIZE
docker-registry-default.gsa2.lightbend.com/lightbend/exercise_002_cluster_base_move_to_artery_tcp   1.3.0               42e9a5268b85        15 hours ago        267MB

Removing an image

Fetch remote branches and delete local branches that are not on remote

git remote update origin --prune

Fetching all remote tags from repository upstream

git fetch upstream 'refs/tags/*:refs/tags/*'
case class NetworkSwitch(name: String) { thisSwitch =>
  case class Port(nr: Int) {
    val switch = thisSwitch
  }
  def switchPortOn(port: Port): Unit = { println(s"Switching on $port") }
}
 
def switchOffAnyPort(port: NetworkSwitch#Port): Unit =
 println(s"switching off $port on ${port.switch}")
@eloots
eloots / install_asciidoc_mac.md
Last active April 26, 2021 08:50
Installation of asciidoc on Mac
@eloots
eloots / Artifact Resolution using Coursier.md
Last active June 17, 2021 14:49
Useful links for the "Artifact Resolution using Coursier" talk

Introduction

This gist contains some complementary information to the "Exploring Coursier's Functionality - Resolving Artifacts"

TODO: Add link to video one it's published

Searching for artifacts using cs complete

cs complete documentation