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
# Copyright: (c) 2022, Jordan Borean (@jborean93) <[email protected]> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function Install-KDCProxyServer { | |
<# | |
.SYNOPSIS | |
Set up a KDC Proxy server. | |
.DESCRIPTION | |
Sets up the KDC proxy server on the current host. |
NOTE: it seems that somebody else beat me to this, so I'm not going to finish this
https://qiita.com/ussvgr/items/81b88653b2845b0f1bea
Prerequisites:
- An ARM64 machine with Ansible and Docker installed to build the images on. This doesn't necessarily need to be the same machine that you're going to deploy AWX on. Considering using something like an AWS Graviton2-based EC2 instance to cut down on image build time
- A Docker registry to push the custom images to
- A Kubernetes cluster on ARM64 to deploy on
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
$bootstrap_wrapper = { | |
&chcp.com 65001 > $null | |
$exec_wrapper_str = $input | Out-String | |
$split_parts = $exec_wrapper_str.Split(@("`0`0`0`0"), 2, [StringSplitOptions]::RemoveEmptyEntries) | |
If (-not $split_parts.Length -eq 2) { throw "invalid payload" } | |
Set-Variable -Name json_raw -Value $split_parts[1] | |
$exec_wrapper = [ScriptBlock]::Create($split_parts[0]) | |
&$exec_wrapper | |
}.ToString() |
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
The paperclips game over at www.decisionproblem.com/paperclips/index2.html is great, but if you want to play the game indefinitely you can lose all progress if you clear browser cache or change laptop. | |
I wanted a way to create a save file and load it later, so I did. Use the below script to generate the output to load the current game state. | |
var saveGame=localStorage.getItem("saveGame"),savePrestige=localStorage.getItem("savePrestige"),saveProjectsActive=localStorage.getItem("saveProjectsActive"),saveProjectsFlags=localStorage.getItem("saveProjectsFlags"),saveProjectsUses=localStorage.getItem("saveProjectsUses"),saveStratsActive=localStorage.getItem("saveStratsActive"),restoreString="/************* COPY ALL TEXT BELOW THIS LINE AND SAVE IN A TEXTFILE SOMEWHERE. RUN IT IN ANY CHROME OR FIREFOX CONSOLE TO LOAD IT. *************/\nlocalStorage.setItem('saveGame', '"+saveGame+"') \nlocalStorage.setItem('savePrestige', '"+savePrestige+"') \nlocalStorage.setItem('saveProjectsActive', '"+saveProjectsActive+"') |
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
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
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 Get-ImageText() | |
{ | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$True,Position=0,ValueFromPipeline=$True)] | |
[String] $Path | |
) | |
Process{ | |
$SplatInput = @{ |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
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
javascript:!function(){var n,e,r,i;n=window,e=document.body,r=JSON.parse,i=JSON.stringify,n.isf||(e.innerHTML="<pre>"+i(r(e.innerText),null,4).replace(/\"(.*)[^\:]\:/g,'<span style="color:#9C3636">$1:</span>')+"</pre>",n.isf=!0)}(); | |
//usage: | |
//save as bookmark and click it whenever you open a json response in a browser tab/window |
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
<# | |
.Synopsis | |
Performance test for output suppression in PowerShell | |
.DESCRIPTION | |
Very basic performance test against different types of output suppression in PowerShell | |
Increase the value of the Iterations parameter to observe how performance impacts the different methods | |
NewerOlder