Skip to content

Instantly share code, notes, and snippets.

View jforge's full-sized avatar

jforge

  • Germany, Bargteheide
  • 13:01 (UTC +02:00)
View GitHub Profile
@jforge
jforge / listTags.sh
Created June 18, 2020 19:51
docker list Tags
#!/usr/bin/env bash
#
# List tags of images on Docker Hub
#
REGISTRY=registry.hub.docker.com
function listTags() {
local repo=${1}
local size=${2:-25}
@jforge
jforge / Windows10AWSEC2.md
Created June 5, 2020 04:22 — forked from peterforgacs/Windows10AWSEC2.md
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

begga - Bagger, Auto, LKW, Traktor, Flugzeug
ellkaweeeeh - LKW, Traktor
oah bagga - Großer Bagger
audo - Auto
tre-er - Traktor
lich-a-an - Licht an
lich a-af - Licht aus
lichti a - Lichter sind an
nulla - schnuller
baba - Papa
@jforge
jforge / sonar.md
Created May 8, 2020 08:45 — forked from sysboss/sonar.md
SonarQube on AWS EC2 - Installation and integration with Jenkins

This article will briefly describe how to install SonarQube as Docker container on Amazon EC2 and integrate it with Jenkins.

Create database instance and user

Go to RDS > Parameter Groups
Create a new Parameter Group with the following parameter:

max_allowed_packet = 268435456

We need to create a new RDS database for SonarQube (you may use an existing MySQL instance)

  1. Go to RDS Instances
@jforge
jforge / install-docker.md
Created May 7, 2020 18:23 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@jforge
jforge / slack_history.py
Created April 30, 2020 19:15 — forked from Chandler/slack_history.py
Download Slack Channel/PrivateChannel/DirectMessage History
# MIT License
# Copyright (c) 2016 Chandler Abraham
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@jforge
jforge / findgrep
Created April 30, 2020 18:51
yet another fast findgrep with some shortcuts; put that into your .zshrc or .bashrc file.
# finds files matching $1 by filename, do not reside in a git and node_modules folders, and contain the string $2
findgrep() {
find . -name "*$1*" -and -type f -and -not -path "*/node_modules/*" -and -not -path "*/.git/*" -print0 | xargs -0 fgrep -n --color=auto "$2"
}
# searches yml files for $1
alias yamls="findgrep '*.yml' $1"
# searches any file for a git conflict trace
alias conflicts="findgrep '' '<<<<<<< HEAD'"
var Thread = Java.type("java.lang.Thread");
var System = Java.type("java.lang.System");
var String = Java.type("java.lang.String");
var topic = "service/ping";
function execute(action) {
out("Test Script: " + action.getName());
for (var i = 0; i < 1000; i++) {
randomTimeSeriesPing();
@jforge
jforge / greengrass-cdk.ts
Created March 3, 2020 13:34 — forked from t04glovern/greengrass-cdk.ts
Example of Greengrass Core deployment with AWS CDK
import cdk = require('@aws-cdk/core');
import greengrass = require('@aws-cdk/aws-greengrass');
import lambda = require('@aws-cdk/aws-lambda');
import { CfnCustomResource } from '@aws-cdk/aws-cloudformation';
import { PolicyStatement, Role, ServicePrincipal, CompositePrincipal } from '@aws-cdk/aws-iam';
import { group_deployment_reset_code } from '../lib/code/group_deployment_reset';
import { thing_vendor_code } from '../lib/code/thing_vendor';
@jforge
jforge / index.js
Created February 21, 2020 04:25 — forked from dabit3/index.js
Lambda function to interact with Amazon Polly & Amazon Translate
var AWS = require('aws-sdk')
AWS.config.update({region: 'us-east-1'})
const uuidV4 = require('uuid/v4')
var translate = new AWS.Translate();
var polly = new AWS.Polly();
var s3 = new AWS.S3({
params: {
Bucket: 'YOURBUCKETNAME',
}
})