This file contains 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
{{- if .Values.createNamespace}} | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: {{.Values.namespace}} | |
--- | |
{{- end}} | |
apiVersion: apps/v1 | |
kind: Deployment |
This file contains 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
access_token=$(curl -s --location --request POST 'https://<+secretManager.environmentVariables.hostname>/oauth2/token' \ | |
--header 'Content-Type: application/x-www-form-urlencoded' \ | |
--data-urlencode 'username=<+secrets.getValue("thycoticUsername")>' \ | |
--data-urlencode 'password=<+secrets.getValue("thycoticPassword")>' \ | |
--data-urlencode 'grant_type=password' | jq -r '.access_token') | |
secret=$(curl -s --location --request GET 'https://<+secretManager.environmentVariables.hostname>/api/v2/secrets/<+secretManager.environmentVariables.key>' \ | |
--header "Authorization: Bearer $access_token" | jq -r '.items[] | select(.isPassword == true) | .itemValue') |
This file contains 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
/** | |
* This script is intended to be run in the Chrome developer console when viewing a Google Spreadsheet in Revision History mode. | |
* It will iterate through each sheet in the spreadsheet, looking for changed cells, and will log the cells that changed. | |
* | |
* Steps to Use: | |
* 1) Load Google Spreadsheet, click File -> Revision History | |
* 2) Select the revision you wish to log in the right column | |
* 3) Open the Developer Tools console and go to the Console tab. | |
* 4) Paste the following code into the console. | |
* 5) Run the function in the console: logChanges(); |
This file contains 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
<?php | |
require_once 'array_combine_keys.php'; | |
class ArrayCombineKeysTest extends PHPUnit_Framework_TestCase | |
{ | |
public function testExample() | |
{ | |
$input = array('apples', 'oranges', 'bananas'); | |
$expectedOutput = array('apples' => 'apples', 'oranges' => 'oranges', 'bananas' => 'bananas'); |
This file contains 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
<?php | |
/** | |
* Challenge Yourselph - 015 | |
* | |
* Longest Word | |
* | |
* Usage: php kness.php [input] | |
* Example: php kness.php "I like cheese a lot" | |
* | |
* If [input] is omitted, tests are run. |
This file contains 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
$this->addElement( | |
$this->createElement('password', 'mypassword') | |
->setLabel('My Password') | |
->setRequired(true) | |
); | |
$this->getElement('mypassword') | |
->getDecorator('errors') | |
->setOption('aria-labelledby', 'mypassword'); |
This file contains 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
/**#@+ | |
* Encoding type constants | |
*/ | |
const ENCTYPE_URLENCODED = 'application/x-www-form-urlencoded'; | |
const ENCTYPE_MULTIPART = 'multipart/form-data'; | |
/**#@-*/ |
This file contains 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
The following Javascript finds the highest z-index in the page and changes the | |
background color to orange. | |
What I'm trying to do is find the DOM element with the highest z-index. I have | |
the following code, but I can't figure out how to do it without having the variable "high". | |
Can you figure out a better way? | |
Also, it doesn't seem to work in Safari. |