for some reason, colorschemes don't seem to work well...
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
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using NSpec; | |
| namespace NspecSample | |
| { |
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
| param ( | |
| [string] $action, | |
| [string] $resourcegroup, | |
| [string] $vmname | |
| ) | |
| function Send-Push{ | |
| param( | |
| [string] $action, | |
| [string] $vmname, |
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/bash | |
| # getopt arg parsing magic | |
| # SO - entirely from http://stackoverflow.com/a/29754866/287085 | |
| getopt --test > /dev/null | |
| if [[ $? -ne 4 ]]; then | |
| echo "I’m sorry, `getopt --test` failed in this environment." | |
| exit 1 | |
| fi |
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
| # scale all deployments to 0 on k8s | |
| $ kubectl get deployments -o jsonpath={.items[*].metadata.name} |xargs -d ' ' -I '{}' kubectl scale deployment --replicas=0 | |
| deployment "auth-service" scaled | |
| deployment "demo-application" scaled | |
| deployment "demo-gateway" scaled | |
| deployment "hystrix" scaled | |
| deployment "opining-worm-rabbitmq" scaled | |
| deployment "webapi-app" scaled |
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
| # look for installed packages | |
| apt list --installed | |
| # aptitude search installed ~i |
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
| function FindProxyForURL(url, host) | |
| { | |
| // firefox - Ctrl-Shift-J Chrome/Chromium: chrome://net-internals/#events | |
| var debug = true; | |
| var log = function() { | |
| if (debug) { | |
| var args = Array.prototype.slice.call(arguments); | |
| alert(args.join(" ")); | |
| } | |
| } |
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/bash | |
| export OVPN_CLIENT=$1 | |
| perl -pe 's#;cert;#open+F,"$ENV{'OVPN_CLIENT'}.crt";join"",<F>#ge' client.conf.template > $1.ovpn | |
| perl -pe 's#;key;#open+F,"$ENV{'OVPN_CLIENT'}.key";join"",<F>#ge' -i $1.ovpn | |
| export OVPN_CLIENT= |
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/python | |
| # | |
| # powerwake - a smart remote host waking utility, supporting multiple | |
| # waking methods, and caching known hostnames and addresses | |
| # | |
| # Copyright (C) 2009 Canonical Ltd. | |
| # | |
| # Authors: Dustin Kirkland <[email protected]> | |
| # | |
| # This program is free software: you can redistribute it and/or modify |
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
| # remove pdf file restrictions from password protected pdf file. | |
| qpdf.exe --decrypt --password=verysecret input.pdf output.pdf |