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
anonymous
anonymous / playground.rs
Created September 27, 2016 19:24
Shared via Rust Playground
use std::marker::Sized;
macro_rules! component {
($i:expr, $name:ident { $( $dn:ident: $def:ty ),* } ) => (
#[derive(Debug)]
struct $name {
$($dn: $def),*
}
+user=> (def c (ProcessBuilder. (into-array ["cat"])))
#'user/c
+user=> (def p (.start c))
#'user/p
+user=> (def o (.getOutputStream p))
#'user/o
+user=> (.write o (.getBytes "hello\n\n"))
nil
+user=> (.flush o)
nil
@ebidel
ebidel / Web Components Resources.md
Last active February 27, 2023 22:04
List of resources related to Web Components
@bmabey
bmabey / default_maps.clj
Last active February 14, 2023 18:02
Maps with default values in Clojure
(ns default-maps
"Maps with default values, similar to how you can specify default values and blocks to Ruby's Hash.
Examples:
user> (def b (assoc-default {:foo 34 :bar 34} (fn [_ k] (str k))))
#'user/b
user> (get b :foo-bar)
\":foo-bar\"
user> (def m (assoc-default {:foo 34 :bar 34} 343))
@jpetazzo
jpetazzo / README.md
Last active August 21, 2019 17:55
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@mixin flexbox( $display: flex, $direction: row, $wrap: wrap, $justify: start, $items: start, $content: start ) {
// <display> - flex | inline-flex
// <direction> - row | row-reverse | column | column-reverse
// <wrap> - wrap | nowrap | wrap-reverse
// <justify> - start | end | center | space-between | space-around
// <items> - start | end | center | baseline | stretch
// <content> - start | end | center | space-between | space-around | stretch
// @include flexbox( flex, row, wrap, start, start, start );
// @include flexbox( inline-flex, column, nowrap, center, start, stretch );
@adambard
adambard / stupid_tricks.matlab
Created May 3, 2012 23:23
Stupid MATLAB Tricks.
function stupid_tricks
% I made some functional tools for MATLAB.
assert(reduce_(@(x, y) x + y, [1, 2, 3, 4]) == 10)
% They got a little out of hand.
join = @(sep, args) ...
if_(ischar(sep), @() ... % Input check
reduce_(@(x, y) [x sep y], ... % Reduce to string
map_(@num2str, args))); % Convert args to string.
@paulmillr
paulmillr / dart.md
Last active July 15, 2023 13:36
Leaked internal google dart email

---------- Forwarded message ----------

From: Mark S. Miller <erights@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: javascript-standard@google.com