Skip to content

Instantly share code, notes, and snippets.

View cfuerst's full-sized avatar

Christian Fürst cfuerst

  • Zurich
  • 16:54 (UTC -12:00)
View GitHub Profile
const { JsonPatch } = require("projen");
const awsConfigureStep = {
uses: "aws-actions/configure-aws-credentials@v1-node16",
with: {
"aws-access-key-id": "${{ secrets.AWS_ACCESS_KEY_ID }}",
"aws-secret-access-key": "${{ secrets.AWS_SECRET_ACCESS_KEY }}",
"aws-region": "${{ secrets.CDK_DEPLOY_REGION }}",
},
};
@cfuerst
cfuerst / check.sh
Created November 23, 2022 12:14
deprecated or gone packages from construct.dev
#/bin/bash
# needs jq and npm install -g check-is-deprecated
echo '["'$(check-is-deprecated $(curl -s "https://constructs.dev/catalog.json"| jq -c '.packages[] | .name' | sort -u | jq -scr ' join(" ")') | tr '\n' '--')'"]' \
| jq '.[0] | split("--")[] | split(":") | {package: .[0], verdict: (if .[1] == "-✖ npm" then "deprecared" else "gone" end)}' \
| jq -s 'group_by(.verdict)[] | {(.[0].verdict): [.[] | .package]}' | jq -s
@cfuerst
cfuerst / books_v1.xml
Created July 12, 2022 15:00
xml example files
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
@cfuerst
cfuerst / index.js
Last active April 20, 2020 18:48
lambda-node-srcds-to-es
/**
* receives logs from srcds engine via config
* logaddress_delall_http (remove all listeners)
* logaddress_add_http "https://foo.bar" (add listener)
* tranform them to meaningful events and send them to elasticsearch
*/
//libs
const https = require('https');
const crypto = require('crypto');