# Install dependencies
$ sudo apt install make gcc git libsecret-1-0 libsecret-1-dev libglib2.0-dev
# Compile binary
$ sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
# Configure git to use binary as credential storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getCheckedOutGitCommitHash() { | |
def gitFolder = "$projectDir/.git/" | |
def takeFromHash = 12 | |
/* | |
* '.git/HEAD' contains either | |
* in case of detached head: the currently checked out commit hash | |
* otherwise: a reference to a file containing the current commit hash | |
*/ | |
def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD | |
def isCommit = head.length == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import getpass | |
import os | |
import time | |
import sys | |
KNOWN_CODENAMES = ['lucid', 'precise', 'trusty', 'utopic', 'vivid', 'wily'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set - | |
export UPDATED_YES=✅ | |
export UPDATED_NO=❌ | |
export DIRTY_YES=🐷 | |
export DIRTY_NO=✨ | |
export REPO_TRUNCATE_CHARS=32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Documentation | |
# https://docs.gitlab.com/ce/api/projects.html#list-projects | |
NAMESPACE="YOUR_NAMESPACE" | |
BASE_PATH="https://gitlab.example.com/" | |
PROJECT_SEARCH_PARAM="" | |
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")" | |
PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
REM Generic .bat file to launch .ps1 files. | |
REM Name the .bat file like the .ps1 file and you are done. | |
set this_file_no_extension=%~n0 | |
set ps1_file=%this_file_no_extension%.ps1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.hibernate.validator.HibernateValidator; | |
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; | |
import javax.validation.Configuration; | |
import javax.validation.ConstraintValidator; | |
import javax.validation.ConstraintValidatorFactory; | |
import java.util.List; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.jonasgroeger.aspect; | |
import org.aspectj.lang.ProceedingJoinPoint; | |
import org.aspectj.lang.annotation.Around; | |
import org.aspectj.lang.annotation.Aspect; | |
@Aspect | |
public class LogAspect { | |
@Around("execution(* de.jonasgroeger.aspect.SubmissionService.uploadAttachment(..))") |
NewerOlder