Skip to content

Instantly share code, notes, and snippets.

View vdemeester's full-sized avatar
👷‍♂️
Working from home

Vincent Demeester vdemeester

👷‍♂️
Working from home
View GitHub Profile
@adisbladis
adisbladis / podman-shell.nix
Last active August 22, 2024 00:43
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };
@dlorenc
dlorenc / FileSet.md
Last active September 5, 2019 14:11

FileSet Pipeline Resource

Today in Tekton, tasks that consume files must operate on a typed Input resource, usually of Type Git or Storage. This leads to a few problems:

  • Tasks must choose which to support, when both should be equivalent
  • Pipelines of Tasks that operate on specific files must invent out-of-band mechanisms to specify which files to operate on

Ideally, Tasks that operate on Files would have a more generic type of resource that can be populated from various sources, and Tasks should not need to communicate about file paths or names out-of-band.

This proposal details a FileSet Pipeline Resource designed to achieve these goals.

#!/usr/local/bin/python
# -*- coding: utf-8 -*-
# Author: Chmouel Boudjnah <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@jackrusher
jackrusher / gcloud-tramp.el
Created June 19, 2019 13:58
Tramping into GCloud instances from within emacs
;; make sure you've set your default project with:
;; gcloud config set project <project-name>
(require 'tramp)
(add-to-list 'tramp-methods
'("gcssh"
(tramp-login-program "gcloud compute ssh")
(tramp-login-args (("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
#!/bin/bash
set -e
SED=sed;type -p gsed >/dev/null 2>/dev/null && SED=gsed #osx blah
JOB_NAME=${1-pull-tekton-pipeline-integration-tests}
JOB_URL=$(hub ci-status -v| sed -n "/${JOB_NAME}/ { s/.*https/https/;p;}")
rm -f /tmp/.prjtlogs${JOB_NAME}.* # Cleanups
TMP=$(mktemp /tmp/.prjtlogs${JOB_NAME}.XXXXXX)

Migrating from Knative Build

This doc describes a process for users who are familiar with Knative Build and BuildTemplate resources to migrate to Tekton TaskRuns and Tasks, respectively.

Tekton's resources are heavily influenced by Knative's Build-related resources, with some additional features that enable them to be chained together inside a Pipeline, and provide additional flexibility and reusability.

| Knative | Tekton |

@chmouel
chmouel / os4-install.bash
Last active April 25, 2019 00:01
install openshift 4 in loop
#!/usr/bin/env bash
# set -x
set -e
SD=$(readlink -f $(dirname $0))
IC=$(readlink -f $(dirname $0)/install-config.yaml )
DIR=${SD}/os4
function recreate() {
#!/usr/bin/env bash
# Chmouel Boudjnah <[email protected]>
RELEASETYPE=4.0.0-0.ci
LATEST=https://openshift-release.svc.ci.openshift.org/releasestream/${RELEASETYPE}/latest/download
set -e
READLINK=readlink;type -p greadlink >/dev/null 2>/dev/null && READLINK=greadlink #osx brew readlink detection
SED=sed;type -p gsed >/dev/null 2>/dev/null && SED=gsed #osx brew sed detection
SD=$($READLINK -f $(dirname $0))
(defun org-mode-export-myfile ()
"Export org document to HTML automatically on change"
(when (equal (buffer-file-name) "/path/to/links.org")
(progn
(org-html-export-to-html)
(message "HTML exported"))))
(add-hook 'after-save-hook 'org-mode-export-myfile)
@phryneas
phryneas / home-manager-module.nix
Last active June 14, 2020 09:02
vscode-liveshare-home-manager-nixos
{pkgs, lib, config, ...}:
with lib;
let
liveshareGist = builtins.fetchTarball {
url = "https://gist.github.com/phryneas/698996d24748d3ce7f61ef818949a28e/archive/3dbf12cd282ebcb6cacf40d466e4a519d4ce1dfe.tar.gz";
sha256 = "0mas9rnr6hn7yiivjs5xvnprhrqwac47nqfxh3vgmm67v982v83l";
};
livesharePkg = pkgs.callPackage liveshareGist {};
cfg = config.services.vsliveshare;
pkg = livesharePkg.override { enableDiagnosticsWorkaround = cfg.enableDiagnosticsWorkaround; };