Skip to content

Instantly share code, notes, and snippets.

View jforge's full-sized avatar

jforge

  • Germany, Bargteheide
  • 10:12 (UTC +02:00)
View GitHub Profile

Tcpdump

Tcpdump is a commandline tool that is used to dump traffic on a network. This tool comes in hand when you want to analyse network captures within the command line. Basically it can do most of the wireshark job.

NOTE This guide might not be complete it just serve as a reference to me.

Additional Note & Reference

@jforge
jforge / rpi3_iot_server.md
Created September 11, 2019 15:11 — forked from xoseperez/rpi3_iot_server.md
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)
@jforge
jforge / lambda-basic-auth.js
Created October 1, 2019 08:13 — forked from lmakarov/lambda-basic-auth.js
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
@jforge
jforge / docker-build-publish.yaml
Created October 30, 2019 11:05 — forked from jonico/docker-build-publish.yaml
Build docker image and push to GPR with GitHub Actions
name: Build and publish Jekyll Docker image for Octocat Generator
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: clean up, docker login && docker build && docker push
@jforge
jforge / index.ts
Created November 6, 2019 10:36 — forked from mipearson/index.ts
Demonstration of using AWS CDK
/*
I was curious as to whether it was possible to make resources
created using CDK constructs work with raw CloudFormation
resources and vice versa.
This aws-cdk app demonstrates a VPC and an ELB that belongs to it
in different, dependant stacks, leveraging CFN outputs / imports,
and leveraging CDK's method of passing information from one
stack to another.
*/
@jforge
jforge / extract-jsii.sh
Created December 16, 2019 06:31 — forked from eladb/extract-jsii.sh
Reflecting on the AWS CDK Type System using jsii-reflect
#!/bin/bash
set -euo pipefail
# given an aws-cdk bundle archive (the one published to github releases), extract
# all .jsii manifests and places them under "jsii/*.jsii"
# now they can be used with jsii-reflect
zip=${1:-}
if [ -z "${zip}" ]; then
echo "Usage: $(basename $0) <cdk-bundle-zip>"
@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',
}
})
@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 / 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 / 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