Skip to content

Instantly share code, notes, and snippets.

@srve4
srve4 / openshift-cheatsheet.md
Created September 17, 2018 12:31 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet

My Openshift Cheatsheet

Logging Aggregation throubleshooting

Process a template, create a new binary build to customize something and them change the DeploymentConfig to use the new Image...

oc process openshift//datagrid72-basic | oc create -f -
@srve4
srve4 / main.tf
Created December 19, 2017 16:28
Example of terraform with chef provisioner
provider "aws" {
region = "${var.region}"
profile = "${var.profile}"
allowed_account_ids = ["${var.aws_account_id}"]
}
data "aws_availability_zones" "available" {}
data "aws_ami" "amazon_linux" {
most_recent = true
@srve4
srve4 / CarbonJobCreate.groovy
Created September 28, 2016 02:30 — forked from jdickie/CarbonJobCreate.groovy
From the upstream job we get a nice Config object that can be iterated through to create jobs. Here we're making a job that will SSH into a server and run PHPUnit tests with variables specified within that Config object. If the Config specifies the job being iterated is a 'master' job, then it creates a MultiJob for running all of the tests in t…
Config.jobs.each { _job ->
switch (_job.type) {
case 'job':
job(namePrefix + _job.name) {
logRotator(CarbonApiProps.num_days_to_keep, CarbonApiProps.num_builds_to_keep,
CarbonApiProps.num_artifacts_days, CarbonApiProps.num_artifacts)
throttleConcurrentBuilds {
categories([carbonThrottleCategory])
}
if (serverName && _job.remoteCommand) {
@srve4
srve4 / JNLPDSC.ps1
Created September 18, 2016 01:45 — forked from duffney/JNLPDSC.ps1
Create Jenkins JNLP Scheduled Task with DSC
Configuration JenkinsSlave {
param (
[string[]]$NodeName
)
Import-DscResource -Module PSDesiredStateConfiguration
Import-DscResource -Module xPSDesiredStateConfiguration
Node $AllNodes.Nodename {

This proposal captures the potential use of an ASP.NET specific Docker image that builds on what microsoft/dotnet already provides.

We could build 2 images:

###microsoft/aspnet: This image would be optimised for you to load your already compiled ASP.NET applications into.

  • Contains the same as the microsoft/dotnet:1.0.0-core, just a runtime and OS pre-reqs.
  • Contains a runtime cache of native assembly images. This cache would contain the closure of all or most of the packages that the ASP.NET team ships. ASP.NET packages + all their dependencies.
  • In benchmarks we have shown that including all ASP.NET assemblies in a runtime cache increase the image size-on-disk by ~10mb whilst improving the start time of a container running MVC Music Store by ~32% (around a 3 second improvement). This improvement represents the time taken to JIT the applications dependencies.
@srve4
srve4 / get-npm-package-version
Created July 21, 2016 02:11 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
echo $PACKAGE_VERSION
@srve4
srve4 / bash-cheatsheet.sh
Created July 17, 2016 01:25 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@srve4
srve4 / kafka.cheat.md
Created June 6, 2016 02:37 — forked from johndstein/kafka.cheat.md
Kafka Cheat Sheet

Kafka Cheat Sheet

Display Topic Information

$ kafka-topics.sh --describe --zookeeper localhost:2181 --topic beacon
Topic:beacon	PartitionCount:6	ReplicationFactor:1	Configs:
	Topic: beacon	Partition: 0	Leader: 1	Replicas: 1	Isr: 1
	Topic: beacon	Partition: 1	Leader: 1	Replicas: 1	Isr: 1
@srve4
srve4 / docker_workshop_microservices_cheat_sheet.md
Created May 28, 2016 05:03 — forked from kesor/docker_workshop_microservices_cheat_sheet.md
docker workshop cheat sheet #2 - microservices