Skip to content

Instantly share code, notes, and snippets.

View reducedhackers's full-sized avatar

nicholas butler reducedhackers

View GitHub Profile
@reducedhackers
reducedhackers / gist:da20c1f0cd3603a012f8312f6e45a097
Created October 13, 2022 09:19
Extracting deploy environment values from a running Kubernetes pod using kubectl get deploy
# We had an issue where a development repository of a Nodejs application did not have a dotEnv( .env ) document included.
# The environment variables had been defined in a seperate K8s Yaml document which pointed to key:value pairs but this was not
# easily pulled into a text file; instead I looked for a way to pull the template container keys out from the running pod as seen
# in the example below
kubectl get pods --all-namespaces
kubectl -n {namespacehere} get deploy {nameofpoddetailedfromprevious} -ojsonpath='{.spec.template.spec.containers[0].env}' | jq -r '.[] | {name,value} | join (" = ")'
@reducedhackers
reducedhackers / getFacebookpageposts.php
Created September 18, 2017 12:37
Getting the most recent posts from a Public Page .
<?php
/*
This may be a long way around a short problem .. but
The PHP SDK from Facebook :
git clone https://github.com/facebook/php-graph-sdk.git
Im using my own FB App to give me a Token/Secret
/*
### Keybase proof
I hereby claim:
* I am reducedhackers on github.
* I am loudmouthman (https://keybase.io/loudmouthman) on keybase.
* I have a public key whose fingerprint is 2A0C 85CF 5C95 0CBF 005A CBAD F170 4B00 2783 A2EA
To claim this, I am signing this object: