Skip to content

Instantly share code, notes, and snippets.

@DzeryCZ
DzeryCZ / ReadingHelmResources.md
Last active June 12, 2024 18:01
Decoding Helm3 resources in secrets

Helm 3 is storing description of it's releases in secrets. You can simply find them via

$ kubectl get secrets
NAME                                                TYPE                                  DATA   AGE
sh.helm.release.v1.wordpress.v1                     helm.sh/release.v1                    1      1h

If you want to get more info about the secret, you can try to describe the secret

$ kubectl describe secret sh.helm.release.v1.wordpress.v1
@navicore
navicore / jsonpath.md
Last active January 24, 2024 17:25
for getting multiple kubernetes yaml fields from kubectl via jsonpath

get name and image and startTime

kubectl get pods -Ao jsonpath='{range .items[*]}{@.metadata.name}{" "}{@..spec..containers[*].image}{" "}{@.status.phase}{" "}{@.status.startTime}{"\n"}{end}'

edited 10/2022 with .. and A suggestions

@a3dho3yn
a3dho3yn / mongodb_c#_cheatsheet.md
Last active June 13, 2024 14:12
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn

As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

@leonardo-m
leonardo-m / gist:6e9315a57fe9caa893472c2935e9d589
Last active June 19, 2024 05:43
A selection of 101 LINQ Samples converted to Rust
// Port of the C# 101 LINQ Samples rewritten into Apple's Swift 3.
#![feature(ordering_chaining, step_by)]
fn main() {
// linq5: Where - Indexed
/*
//c#
public void Linq5()
{
@olih
olih / jq-cheetsheet.md
Last active June 20, 2024 16:22
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@yvanin
yvanin / AwsV4SignatureCalculator.cs
Last active March 5, 2024 20:37
This C# code calculates a request signature using Version 4 signing process. It was developed for and tested on Amazon SQS requests, so it does not cover every scenario for the other services, e.g. multipart uploads are not supported. Nevertheless, it's simple and independent single class that can be easily embedded into other projects. .NET Fra…
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
namespace AwsV4SignatureCalculator
@appleboy
appleboy / copy_content.mkd
Last active May 18, 2023 07:03
Copy all branch from another repository?

Repository url

origin: https://github.com/appleboy/git-test
remote: https://github.com/appleboy/html5-template-engine

Copy all branch from another repository

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 21, 2024 01:45
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname