Skip to content

Instantly share code, notes, and snippets.

View ScienJus's full-sized avatar
🎯
Code Hard, Play Hard

ScienJus ScienJus

🎯
Code Hard, Play Hard
View GitHub Profile
@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

@bendavis78
bendavis78 / gist:3157948
Created July 22, 2012 02:14
Installing pygit2 on ubuntu

Download and build libgit2

$ cd ~/.local/src/
$ git clone git://github.com/libgit2/libgit2.git 
$ cd libgit2
$ mkdir build && cd build
$ cmake ..
$ cmake --build .

If debugging, use the following cmake commands instead:

@fmela
fmela / stacktrace.cxx
Last active September 22, 2023 10:58
A C++ function that produces a stack backtrace with demangled function & method names.
/*
* Copyright (c) 2009-2017, Farooq Mela
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright