There are two parts to this:
- Managing access to non-public S3 resources.
- Building RPM repositories in an automated, deterministic way that Yum can use.
In general, a CentOS 7 x86_64 box in AWS EC2; in specific, this Packer profile.
#!/bin/bash | |
CONTENT_TYPE="application/json" | |
DESCRIPTION="bad things™ are happening" | |
URL="https://events.pagerduty.com/generic/2010-04-15/create_event.json" | |
if [ $# -ne 3 ]; then | |
echo "Usage: pd-event.sh [TYPE] [SERVICE KEY] [INCIDENT KEY]" | |
echo " - TYPE: [t]rigger | [a]cknowledge | [r]esolve" | |
echo " - SERVICE KEY: unique identifier for service" |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
#!/usr/bin/env python | |
"""Merge multiple JUnit XML results files into a single results file.""" | |
# MIT License | |
# | |
# Copyright (c) 2012 Corey Goldberg | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
import sys | |
import pika | |
# prerequisites are that you have RabbitMQ installed | |
# create a "darkmatter" named VirtualHost (VHOST) | |
# rabbitmqctl.bat add_vhost darkmatter | |
# create a user APP_USER with associated APP_PASS word | |
# rabbitmqctl add_user darkmatteradmin <password> | |
# give the APP_USER the necessary permissions | |
# rabbitmqctl set_permissions -p darkmatter darkmatteradmin ".*" ".*" ".*" |
import java.util.ArrayList; | |
import hudson.model.*; | |
def q = Jenkins.instance.queue | |
for (queued in Jenkins.instance.queue.items) { | |
q.cancel(queued.task) | |
} | |
for (job in Jenkins.instance.items) { | |
stopJobs(job) |
There are two parts to this:
In general, a CentOS 7 x86_64 box in AWS EC2; in specific, this Packer profile.
'Update or create a stack given a name and template + params' | |
from __future__ import division, print_function, unicode_literals | |
from datetime import datetime | |
import logging | |
import json | |
import sys | |
import boto3 | |
import botocore |
If you're writing bare-bones javascript for the browser, creating Chrome Apps and Extensions, or using remote coding apps like cloud9, Koding, or Nitrous, you may not need to install Ubuntu. Some tutorials can be done entirely within the browser. The tradeoff is that you won't have a full-featured command line, and you may hit a point where you can't install something that you need.
To start coding within Chrome OS, install Text or Caret as a text editor. (Text stores files in Google Docs and Caret stores the files locally on your machine, which may help you choose.) After that, you're good to go, since Chromebooks come with a browser installed.
global | |
daemon | |
user haproxy | |
group haproxy | |
log /dev/log daemon info | |
maxconn 4096 | |
defaults | |
log global | |
option dontlognull |