Skip to content

Instantly share code, notes, and snippets.

View jonico's full-sized avatar
🪐
@ home

Johannes Nicolai jonico

🪐
@ home
View GitHub Profile
@jonico
jonico / evaluierungsfragen.md
Last active December 6, 2019 08:51
Evaluierungsfragen/kriterien bei der Auswahl einer Versionskontrollverwaltungs- / Social Coding-Plattform

Business Coding Platform Evaluierungskriterien / Fragen

  • Wie lange dauert es, einen neuen Entwickler in die Plattform einzuarbeiten? Welcher Trainingsaufwand ist erforderlich, bis der erste Commit in Produktion gehen kann?

  • Wie unterstützt die gewählte Plattform das Aufbauen eines unternehmensweiten Entwickler-Profils, aus dem die Entwicklungsaktivität, Popularität, Programmiersprachen und Tätigkeitsschwerpunkt (welche Repositories) eines Entwicklers oder Entwicklerteams hervorgeht?

  • Wie können Entwickler und Designer schnell und unproblematisch Quellcode-Snippets, Design-Überlegungen, Interview-Fragen und andere Markdown-Dokumente miteinander teilen? Besteht die Möglichkeit, diese Dokumente zu durchsuchen, insofern sie nicht geheim angelegt worden?

  • Wie können Nicht-Entwickler (Ingenieure, Fachabteilung, Projektleiter, Marketing, Legal), Änderungen an Design-Dokumenten und Dokumentation ohne Kommandozeilenwissen oder Desktop-Applikationen vorschlagen? Erlaubt die Web-Oberfläche das Hinzufügen, Lö

@jonico
jonico / Jenkinsfile
Last active January 31, 2024 09:43
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@jonico
jonico / PrintRepoAccess.groovy
Created January 15, 2017 14:59
Who can access a given repo on a GitHub Enterprise instance?
#!/usr/bin/env groovy
/**
* groovy script to show all users that can access a given repository in a GitHub Enterprise instance
*
*
* Run 'groovy PrintRepoAccess.groovy' to see the list of command line options
*
* First run may take some time as required dependencies have to get downloaded, then it should be quite fast
*
@jonico
jonico / evaluate.groovy
Last active January 1, 2017 19:13
Evaluation script for InformatiCup2017 submissions
import java.io.File
categories = ["DEV", "HW", "OTHER", "EDU", "WEB", "DATA", "DOCS"] as Set
def readInDataSet (dataSetName, categoryToRepo, repositories) {
categories.each {
categoryToRepo[it]= [] as Set
}
count = 1;
#!/bin/bash
repoSize=`du -hsk | cut -f 1`
if [ $repoSize -gt "1500" ]; then
echo "Repository size is greater than 1500 kb : ${repoSize}"
exit 1
fi
#!/usr/bin/env groovy
package org.kohsuke.github
@Grab(group='org.kohsuke', module='github-api', version='1.75')
import org.kohsuke.github.GitHub
class ListUsersInOrganizations extends GitHub {
static void main(args) {
#!/usr/bin/env groovy
package org.kohsuke.github
@Grab(group='org.kohsuke', module='github-api', version='1.75')
import org.kohsuke.github.GitHub
class ListUsersInOrg extends GitHub {
static void main(args) {
@jonico
jonico / dashboard.xml
Created September 20, 2016 15:04
Splunk Dashboard for GitHub Enterprise
<dashboard>
<label>Octodemo performance stats</label>
<row>
<panel>
<chart>
<title>Top fetched repos</title>
<search>
<query>index="octodemo" upload-pack user| top repo</query>
<earliest>@w0</earliest>
<latest>now</latest>
@jonico
jonico / .gitconfig
Created August 9, 2016 09:38
My .gitconfig
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
#!/bin/bash
zero_commit="0000000000000000000000000000000000000000"
# we have to change the home directory of GPG
# as in the default environment, /root/.gnupg is not writeable
export GNUPGHOME=/tmp/
# Do not traverse over commits that are already in the repository
# (e.g. in a different branch)