Skip to content

Instantly share code, notes, and snippets.

🚀
@ W-JAX

Johannes Nicolai jonico

🚀
@ W-JAX
  • GitHub Staff
  • Potsdam
Block or report user

Report or block jonico

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jonico
jonico / docker-build-publish.yaml
Created Aug 19, 2019
Build docker image and push to GPR with GitHub Actions
View docker-build-publish.yaml
name: Build and publish Jekyll Docker image for Octocat Generator
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: clean up, docker login && docker build && docker push
@jonico
jonico / azure-pipelines.yml
Last active Sep 12, 2019
Build and push a docker image into GitHub Package registry and create a tag in GitHub using Azure Pipelines (AZP) yaml files (azure-pipelines.yaml)
View azure-pipelines.yml
resources:
- repo: self
trigger:
- master
steps:
- script: ./cleanup.sh
displayName: Clean Up
@jonico
jonico / query_github_audit_log.graphql
Created Jun 6, 2019
How to query GitHub's audit log with GraphQL
View query_github_audit_log.graphql
query {
organization(login: "se-saml") {
auditLog(first: 50) {
edges {
node {
... on RepositoryAuditEntryData {
repository {
name
}
}
@jonico
jonico / list-business-account-members-and-their-orgs.graphql
Last active Mar 14, 2019
GraphQL Examples with GitHub business account
View list-business-account-members-and-their-orgs.graphql
query getOrgsInBusiness($slug: String!) {
business(slug: $slug) {
... on Business {
name
resourcePath
avatarUrl
members(first: 100) {
edges {
organizations(first: 100) {
@jonico
jonico / github-saml-with-auth0.md
Created Feb 21, 2019
How to setup GitHub SAML authentication with Auth0
View github-saml-with-auth0.md

When setting up Auth0 as a SAML IdP for GitHub, you most likely created an Application in Auth0 representing GitHub and enabled the SAML WebApp addon, as explained here. In order to ensure that the proper SAML response is sent to GitHub, make sure to configure the audience value in the JSON settings for the SAML Web App addon, replacing "acme" with your org name in GitHub:

image

@jonico
jonico / github_basic_auth_retrieve_emails.go
Created Jan 5, 2019
Example of a basic GitHub OAuth app tha retrieves all emails (including private) of a GitHub user in Go
View github_basic_auth_retrieve_emails.go
// Simple OAuth server retrieving the email adresses of a GitHub user
package main
import (
"context"
"encoding/json"
"github.com/google/go-github/github"
"golang.org/x/oauth2"
"log"
"net/http"
@jonico
jonico / Jenkinsfile
Last active Jul 23, 2019
Jenkins in Kubernetes cluster
View Jenkinsfile
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Environment variables: These environment variables should be set in Jenkins in: `https://github-demo.ci.cloudbees.com/job/<org name>/configure`:
For deployment purposes:
- HEROKU_PREVIEW=<your heroku preview app>
- HEROKU_PREPRODUCTION=<your heroku pre-production app>
@jonico
jonico / diff-branches-client.sh
Last active Sep 4, 2018
Example how to compute diffs of more than 300 files between branches/commits/tags server side using a pre-receive hook in GitHub Enterprise
View diff-branches-client.sh
#!/usr/bin/env bash
# Client side script to trigger pre-receive hook and scan its output
# usage: diff-branches-client.sh <repo URL> <compare branch> [base branch] [magic trigger branch]
# Examples:
# diff-branches.client.sh https://jonico@octodemo.com/jonico/large-branch-diff-with-prereceive-hook.git compare-branch feature-branch # diffs compare-branch with feature branch
# diff-branches.client.sh https://jonico@octodemo.com/jonico/large-branch-diff-with-prereceive-hook.git compare-branch # diffs compare-branch with master
# diff-branches.client.sh https://jonico@octodemo.com/jonico/large-branch-diff-with-prereceive-hook.git f75b18abbb06 f75b18abbb06^1 # diffs commit f75b18abbb06 with its parent
# diff-branches.client.sh https://jonico@octodemo.com/jonico/large-branch-diff-with-prereceive-hook.git master master~2 # diffs latest commit on master with its grandparent
@jonico
jonico / Jenkinsfile.groovy
Created Feb 19, 2018
Abbreviated Jenkinsfile to build on multiple archs (from conan.io project)
View Jenkinsfile.groovy
for (x in slaves) {
def slave = x
for (y in pyvers) {
def pyver = y
builders["${slave} - ${pyver}"] = {
node(slave) {
stage("${slave} - ${pyver}"){
step ([$class: 'WsCleanup'])
checkout scm
def bn = env.BUILD_NUMBER
@jonico
jonico / ggg-ideas-for-constellation.md
Created Aug 28, 2017
GGG Ideas for constellations Munich
View ggg-ideas-for-constellation.md
  • feedback geo-mirroring & hot patching
  • GGG requirements letter
  • conan.io
You can’t perform that action at this time.