Skip to content

Instantly share code, notes, and snippets.

View sambhav's full-sized avatar
🛠️
building cool stuff

Sambhav Kothari sambhav

🛠️
building cool stuff
View GitHub Profile
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
# set -e # We disable 'set -e' globally because we need to check xargs' exit status later
set -u
# Pipestatus: return status of the last command that threw a non-zero exit code.
# set -o pipefail # Disabled globally, check pipe status manually where needed or rely on function exit codes
# --- Configuration ---
REPO="buildpacks-community/kpack" # !!! DOUBLE CHECK THIS IS THE CORRECT REPO !!!
package main
import (
"os"
"os/signal"
"syscall"
cmd "github.com/buildpacks/lifecycle/cmd"
launcher "github.com/buildpacks/lifecycle/cmd/launcher/cli"
reaper "github.com/ramr/go-reaper"
sam:palm_tree: May 12th at 6:54 AM
@steering-committee (tagging you as this might result in a significant change across a wide set of buildpacks) / @tooling-maintainers - We have been using paketo buildpacks based off packit with sbom support for a while now and I had a couple of pieces of feedback around separation of the SBOM generation tooling from the packit logic
Currently each packit based buildpack imports the entirety of syft. This means that almost all of these buildpacks with the recent version of syft will also import large chunks of dependencies (related to cosign) which hamper development on these buildpacks and dependency management with them (it pulls in all sorts of k8s related deps) and also increases the buildpack size (went from 2mb to 5.5mb) for EVERY buildpack using packit. This is a fairly significant increase to the overall builder if you account for duplicates due to meta buildpacks.
The strong coupling with syft also means that whenever there are breaking changes with syft, we must fi
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
name,ring,quadrant,isNew,description
"C#",adopt,"Languages and Frameworks",true,"<a href='https://docs.microsoft.com/en-us/dotnet/csharp/'>C#</a> is our language of choice. It's strongly-typed, blends functional and object-oriented programming and works on all the OS we need to support."
"TypeScript",adopt,"Languages and Frameworks",true,"<a href='https://www.typescriptlang.org/'>TypeScript</a> is our default choice for running code in the browser. It's strongly-typed and smoothes out the rough bits of JavaScript."
"Go",trial,"Languages and Frameworks",true,"<a href='https://golang.org/'>Go</a> is the natural language to use when extending Kubernetes with operators."
"Java",trial,"Languages and Frameworks",true,"Redgate purchased Flyway, written in <a href='https://www.oracle.com/java/'>Java</a>. Java is a plausible choice for new products (due to its rich ecosystem), but we default to C#."
"Bash",adopt,"Languages and Frameworks",true,"<a href='https://www.gnu.org/software/bash/'>Bash</a> is our default choic
---
apiVersion: v1
data:
key: dmFsdWU=
kind: Secret
metadata:
name: secret-name
namespace: other-namespace
type: Opaque
---
March 31, 2021 : feat: add chart support to prometheus servicemonitor #535
March 30, 2021 : fix: codeowners team
March 25, 2021 : feat: Add rate limit related metrics/endpoint #526
February 25, 2021 : feat: add feature to limit approval to a list of users #509
February 25, 2021 : fix: minor bugs #508
February 25, 2021 : fix: Correct use of cache env
February 22, 2021 : feat: add age validator #367
February 22, 2021 : feat: add a info panel for 'limit' option in approval validator #509
February 21, 2021 : feat: name sub-option for repository filter
@sambhav
sambhav / before-after.md
Last active October 14, 2019 21:45
Before and after running code through pygmend

Before

def test():
    """This is an example of a module level function. Function parameters should be documented in the ``Args`` section. The name
    of each parameter is required. The type and description of each parameter
    is optional, but should be included if not obvious.

    If \*args or \*\*kwargs are accepted,
    they should be listed as ``*args`` and ``**kwargs``.
@sambhav
sambhav / word_popularity.ipynb
Last active July 6, 2019 11:38
word_popularity.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- mode: python -*-
import os
import platform
block_cipher = None
def get_resources():
data_files = []
for file_name in os.listdir('resources'):