Skip to content

Instantly share code, notes, and snippets.

View madsjakobsen's full-sized avatar
👨‍🏭
Weilding Pipelines

Mads Dam Jakobsen madsjakobsen

👨‍🏭
Weilding Pipelines
View GitHub Profile
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@offlinehacker
offlinehacker / Dockerfile
Created March 8, 2021 12:04
k3s dind rootless devcontainer
FROM xtruder/debian-nix-devcontainer:flakes
# docker user
ARG DOCKER_GID=966
RUN groupadd -g ${DOCKER_GID} docker && usermod -a -G docker ${USERNAME}
# create volume for pulumi
RUN sudo -u user mkdir -p /home/${USERNAME}/.pulumi
VOLUME /home/${USERNAME}/.pulumi
@Farious
Farious / rollback_aab.sh
Last active June 13, 2024 07:39
Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab. This enables us to re-submit a previously submited aab to the play store, doing a rollback to the given version.
#!/bin/sh
#
# Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab.
# Run this script with: sh rollback.sh your_project.aab android_signing_key.key key_alias key_pwd version_code version_name
#
# Necessary setup:
#
# jarsigner - This binary should exist in the path
#
# Configuration.proto and Resources.proto can be found in aapt2's github
@robcowie
robcowie / config_arg_parser.py
Created February 18, 2019 10:00
ArgumentParser and argparse Action that can pull args from a yaml config file
# -*- coding: utf-8 -*-
"""
Part of the undertime app https://gitlab.com/anarcat/undertime by Antoine Beaupré.
AGPLv3 licence (https://gitlab.com/anarcat/undertime/blob/master/LICENSE)
"""
import argparse
import os
@jmcaldera
jmcaldera / ssh_multikeys.md
Last active May 25, 2024 19:58
Multiple SSH Keys macOS

Multiple SSH Keys on same client

Check if you have existing keys by opening the terminal and entering: ssh-add -l OR ls -al ~/.ssh and check for any file called (usually) id_rsa or similar

Identify the host you're using your current key for. You probably added this key to, for example your github or gitlab account. We will use this later on.

If you don't have a config file on ~/.ssh folder, you will need to create one. We'll get back to this later.

@ivan-pinatti
ivan-pinatti / jenkins-set-global-shared-library.groovy
Created May 21, 2018 18:39
Jenkins - Set Global Share Library plugin parameters via groovy script - #jenkins #groovy #library #shared #sharedLibrary
#!groovy
// imports
import hudson.scm.SCM
import jenkins.model.Jenkins
import jenkins.plugins.git.GitSCMSource
import org.jenkinsci.plugins.workflow.libs.*
import org.jenkinsci.plugins.workflow.libs.LibraryConfiguration
import org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever
@lxwagn
lxwagn / semaphore.go
Last active June 22, 2024 12:01
Idiomatic semaphore example in Go (using Buffered Channels)
// Idiomatic Semaphore Example in Go
// Lucas Wagner
// Golang has no built-in facility to implement semaphores, so a common design
// pattern is to use buffered channels.
package main
import (
"fmt"
@evantill
evantill / main_critical_extendedkeyusage_timestamping.go
Last active January 1, 2022 22:23
x509 creation in go with a critical extended flag
/*
from https://golang.org/src/crypto/tls/generate_cert.go
*/
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
@Duroktar
Duroktar / store.py
Created September 23, 2017 16:40
A basic Redux store for Python in 50 lines of code (including comments)
def createStore(reducer, state, enhancer):
"""
Store instance constructor
Usage:
.. code-block: python
from store import createStore
@skabber
skabber / exportOptions.plist
Last active April 14, 2024 20:47
Export Options Plist Example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>XXXXXXXXXX</string>
<key>uploadBitcode</key>
<true/>