start new:
tmux
start new with session name:
tmux new -s myname
| #!groovy | |
| import groovy.json.JsonOutput | |
| import groovy.json.JsonSlurper | |
| def label = "mypod-${UUID.randomUUID().toString()}" | |
| podTemplate(label: label, yaml: """ | |
| spec: | |
| containers: | |
| - name: mvn | |
| image: maven:3.3.9-jdk-8-alpine |
| #!/bin/bash | |
| ########## | |
| # contents | |
| ########## | |
| # contents | |
| # notes | |
| # script setup | |
| # git config files |
| import hudson.triggers.*; | |
| for (item in Jenkins.instance.getItems(Project)) { | |
| println("--- Scheduling for " + item.name + " ---") | |
| def trigger = item.triggers.get(Jenkins.instance.getDescriptor(TimerTrigger.class)); | |
| if (trigger) { | |
| println trigger.spec; | |
| } | |
| } |
| ''' | |
| @author Bommarito Consulting, LLC | |
| @date 2012-12-23 | |
| Generate .ssh/config lines from EC2 instance information. | |
| ''' | |
| # Imports | |
| import boto | |
| import os |
| #!/usr/bin/python | |
| """AWS EC2 SSH config Generator.""" | |
| import boto3 | |
| import os | |
| # The location and name of our generated config file | |
| path_to_config = '/.ssh/aws_demo.config' |
| #!/usr/bin/python | |
| """AWS EC2 SSH config Generator.""" | |
| import boto3 | |
| import os | |
| import sys | |
| # The location and name of our generated config file | |
| path_to_config = '/.ssh/aws_demo' |
| # /srv/salt/upgrade_the_app.sls | |
| # Example of a complex, multi-host Orchestration state that performs status checks as it goes. | |
| # Note, this is untested and is meant to serve as an example. | |
| # Run via: salt-run state.orch upgrade_the_app pillar='{nodes: [nodeA, nodeB], version: 123}' | |
| {% set nodes = salt.pillar.get('nodes', []) %} | |
| {% set all_grains = salt.saltutil.runner('cache.grains', | |
| tgt=','.join(nodes), tgt_type='list') %} | |
| {# Default version if not given at the CLI. #} |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.
Here's how it should work:
| Some Jenkinsfile examples |