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
#!/usr/bin/env zx | |
# npm install -g zx | |
# ./aws-to-cloudflare-records.mjs my-amazing-zone.com | |
const domain = process.argv[3] | |
const recordName = (n) => n.replace("\\052","*").replace(`.${process.argv[3]}.`, "") | |
const resourceName = (n) => recordName(n).replace(/-/g,"_") | |
const toString = ({name, type, ttl, value}) => `resource "cloudflare_record" ${JSON.stringify(resourceName(name))} { |
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
def myText = ''' | |
properties: | |
- param: booleanParam | |
args: | |
name: ENABLE_AAT | |
defaultValue: true | |
description: "Should we run AATs" | |
- param: stringParam | |
args: | |
name: NEXT_BUILD |
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
pimpMyStage('build') { stage -> | |
echo "Body of stage ${stage}" | |
} | |
def pimpMyStage(name,Closure body) { | |
node(name) { | |
stage name | |
timestamps { | |
colours { | |
keys { |
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 strict'; | |
var gulp = require('gulp'); | |
var through = require('through2'); | |
// https://gulp.readme.io/docs | |
gulp.task('default', () => { | |
gulp.src('src/**/*') | |
.pipe(pipeFunction()) | |
.pipe(gulp.dest('dist')) |