This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DataContractUrlEncodedSerializer : ISerializer | |
{ | |
/// <summary> | |
/// Serializes the specified object utilizing DataContract and DataMembers if present. | |
/// </summary> | |
/// <param name="obj">The object.</param> | |
public string Serialize(object obj) | |
{ | |
if (obj == null) | |
return null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo | openssl s_client -showcerts -servername some-domain.com -connect some-domain.com:443 2>/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --insecure -v https://some-domain.com 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
fzf | xargs -I {} -r git checkout --ours -- {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo -n "Specify device to install on:" | |
read DEVICE | |
echo -n "Specificy path for image to be installed:" | |
read IMAGE_PATH | |
sudo wipefs --all ${DEVICE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fluxctl list-images -w kube-system:deployment/sealed-secrets-controller -o json -l 0 | jq -r '.[].Containers[].Available[].ID' | grep 'v.\...\..$' | |
rg "kind: Deployment" -l | xargs -I _ yq -r 'select( .kind == "Deployment") | .spec.template.spec.containers[].image' _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
get_filename() { | |
cat $1 | yq -r '(.metadata.name|ascii_downcase) + "_" + (.kind|ascii_downcase) + ".yaml"' | head -n 1| xargs echo | |
} | |
for x in $(exa -G $1); do mv -T $x $(get_filename $x); done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker run --rm myoung34/fast-cli ./node_modules/.bin/fast -u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n foo | openssl dgst -binary -sha256 | openssl base64 |