- What is the problem?
- What exactly does this problem mean? Spend 5 minutes of quiet time thinking to yourself the implications of what is happening and why it may be happening. Are there recent changes going on? Did someone mention this at standup?
- Does it happen in prod too? (run the build right now, etc.)
- Does it happen consistently or only sometimes?
- If not consistent, what seems to be the variability? (build slave, environment)
- Does the documentation of the project mention anything like this?
- What systems could potentially be involved in this issue?
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Here's an example of the kind of GraphQL query that Code.gov might submit to the GitHub GraphQL endpoint. It also explains why the switch to using GraphQL (in GitHub API version 4) makes things a ton easier than all the REST calls we were doing before (in GitHub API version 3).
  
    
      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
    
  
  
    
  | #Add Groovy Script Permissions: Manage Jenkins » In-process Script Approval and Approve | |
| def job = jenkins.model.Jenkins.instance.getItemByFullName('folder//projname') | |
| def myBuild = job.getBuild('123') | |
| myBuild.keepLog(true) | 
  
    
      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
    
  
  
    
  | `emacs --daemon` to run in the background. | |
| `emacsclient.emacs24 <filename/dirname>` to open in terminal | |
| NOTE: "M-m and SPC can be used interchangeably". | |
| * Undo - `C-/` | |
| * Redo - `C-?` | |
| * Change case: 1. Camel Case : `M-c` | |
| 2. Upper Case : `M-u` | |
| 3. Lower Case : `M-l` | 
  
    
      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
    
  
  
    
  | ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
| ### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
| ### You can download all the binaries one-shot by just giving the BASE_URL. | |
| ### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
| ### Script is updated for every JDK release. | |
| ### Features:- | |
| # 1. Resumes a broken / interrupted [previous] download, if any. | |
| # 2. Renames the file to a proper name with including platform info. | 
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| set -e | |
| # Standalone script to install Xcode w/ CLI tools on a fresh OS X 10.8, via applescript. | |
| # This might be more lovely (and maintainable) as ruby, if only we could have some handy | |
| # gems that all need a compiler for native extensions. We don't, so do it old school. | |
| # Some things: | 
  
    
      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
    
  
  
    
  | # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. | 
  
    
      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
    
  
  
    
  | // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |