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
jobs: | |
- script: > | |
multibranchPipelineJob('jenkins-casc-seed') { | |
def repo = "https://my-github-server/..." | |
branchSources { | |
github { | |
// The id option in the Git and GitHub branch source contexts is now mandatory (JENKINS-43693). | |
id(UUID.nameUUIDFromBytes(repo.getBytes()).toString()) // IMPORTANT: use a constant and unique identifier | |
scanCredentialsId('github') | |
repoOwner('my-org') |
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
( >&2 pause ) >> yourfile.txt |
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
pipeline { | |
agent none | |
stages { | |
stage('stage') { | |
steps { | |
script { | |
if (binding.hasVariable('superVariable')) { | |
echo("superVariable == 0: ") | |
echo(superVariable == 0) | |
} |
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
gain == weight == amplitude == strength | |
bias == phase == offset == shift |
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
import paramiko | |
def get(host, user, passw, remote_path, local_path, public_host_key_filepath=None): | |
with paramiko.SSHClient() as ssh: | |
if public_host_key_filepath: | |
# secure | |
ssh.load_host_keys(public_host_key_filepath) | |
ssh.set_missing_host_key_policy(paramiko.RejectPolicy()) | |
else: | |
# not secure |
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
class _Flavour(object): | |
"""A flavour implements a particular (platform-specific) set of path | |
semantics.""" | |
def __init__(self) | |
def parse_parts(self, parts) | |
def join_parsed_parts(self, drv, root, parts, drv2, root2, parts2) | |
""" | |
Join the two paths represented by the respective | |
(drive, root, parts) tuples. Return a new (drive, root, parts) tuple. | |
""" |
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
Create a file with the following contents: | |
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Fix for error LNK1318 in hyperV docker containers --> | |
<ItemDefinitionGroup> | |
<ClCompile> | |
<DebugInformationFormat>OldStyle</DebugInformationFormat> | |
</ClCompile> | |
</ItemDefinitionGroup> |
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
git checkout -- . DISCARD non-staged changes | |
git clean -d -f DISCARD untracked files | |
git cherry-pick --no-commit $SHA Cherry-pick to staging area | |
git revert --no-commit $SHA Revert to staging area | |
git push -f FORCE push | |
git reset --hard @{u} RESET HARD to upstream-branch | |
git branch --unset-upstream Track Remote: None (for current branch) | |
git branch --set-upstream-to=$REMOTE_BRANCH Track Remote (for current branch) |