I hereby claim:
- I am jblinuxclicks on github.
- I am jblinuxclicks (https://keybase.io/jblinuxclicks) on keybase.
- I have a public key ASAWH9MS89HFBSJZhCuBjUHk4Z-gqLUDWdl1QsHoTELSvQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| # Suspend, hibernate, restart or shutdown the computer without sudo! | |
| # by Chris Wong | |
| # Released to the public domain. | |
| NAME=$0 | |
| usage() { | |
| echo "Usage: $NAME suspend|hibernate|restart|shutdown" |
| Some Jenkinsfile examples |
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:
| # /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. #} |
| #!/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' |
| #!/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' |
| ''' | |
| @author Bommarito Consulting, LLC | |
| @date 2012-12-23 | |
| Generate .ssh/config lines from EC2 instance information. | |
| ''' | |
| # Imports | |
| import boto | |
| import os |
| 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; | |
| } | |
| } |
| #!/bin/bash | |
| ########## | |
| # contents | |
| ########## | |
| # contents | |
| # notes | |
| # script setup | |
| # git config files |