aws --region us-east-1 pricing get-products --service-code AmazonEC2 --filters \
"Type=TERM_MATCH,Field=capacitystatus,Value=Used" \
"Type=TERM_MATCH,Field=marketoption,Value=OnDemand" \
"Type=TERM_MATCH,Field=currentGeneration,Value=Yes" \
"Type=TERM_MATCH,Field=instanceType,Value=inf1.2xlarge" \
"Type=TERM_MATCH,Field=location,Value=US West (Oregon)" \
"Type=TERM_MATCH,Field=operatingSystem,Value=Linux" \
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
### Cross-IAM Invalidate CloudFront from a central pipeline account | |
### | |
### new codepipelineActions.LambdaInvokeAction({ | |
### runOrder: 3, | |
### actionName: 'InvalidateCloudFront', | |
### role: this.devOpsPipelineRole, | |
### lambda: Function.fromFunctionArn(this, "test-cloudfrontInvalidator", "arn:aws:lambda:eu-west-1::function:pipelineInvalidateCloudFront"), | |
### userParameters: { | |
### bucketName: bucket.bucketName, | |
### targetPipelineRole: this.testPipelineRole.roleArn |
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
### Unlock card during ykman usage | |
.zshrc | |
``` | |
GPG_TTY=$(tty) | |
export GPG_TTY | |
``` |
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
### Dependencies: | |
### pip3 install python-sonarqube-api | |
### | |
### Usage: | |
### SONARQUBE_API_TOKEN=123 SONARQUBE_API_URL=https://my.sonar.service.com/ python3 sonar.py <project-name> | |
import os | |
import sys | |
from distutils.util import strtobool |
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
require('cross-fetch/polyfill'); | |
const fs = require('fs'); | |
const { Api } = require('endomondo-api-handler'); | |
const { DateTime } = require('luxon'); | |
const api = new Api(); | |
(async () => { | |
await api.login(LOGIN, PASSWORD); |
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
#!/bin/bash -e | |
set -x | |
DIFF=$(git diff master --name-only | grep java | xargs) | |
JAR_SRC="https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.32/checkstyle-8.32-all.jar" | |
JAR_PATH="checkstyle-8.32-all.jar" | |
if [ -z "$DIFF" ]; then | |
exit 0 | |
fi |
Commit Message Guidelines
Example of a properly formed commit message:
JIRA-123 Short (72 chars or less) summary
More details about the change, including functional and/or technical
explanation. Wrap it to 72 characters. The blank line separating the
summary from the body is critical (unless you omit the body entirely).
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
#!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 |
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
// Requires: | |
// https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin | |
pipeline { | |
agent { | |
label "master" | |
} | |
parameters { | |
choice(name: 'ENV', choices: ['DEV', 'TEST'], description: 'Select environment to deploy to') | |
gitParameter name: 'TAG', type: 'PT_BRANCH_TAG', sortMode: 'DESCENDING_SMART', defaultValue: 'develop' |
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 javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { | |
public static void main(String[] args) { |
NewerOlder