Skip to content

Instantly share code, notes, and snippets.

View jforge's full-sized avatar

jforge

  • Germany, Bargteheide
  • 09:01 (UTC +02:00)
View GitHub Profile
@jforge
jforge / jenkins-agent.service
Created January 18, 2022 10:55 — forked from cidermole/jenkins-agent.service
Systemd service file for Jenkins agent on Ubuntu 20.04 Focal Fossa
# Steps to install Jenkins Agent using JNLP connection on Ubuntu 20.04 Focal Fossa
#
# * create an Agent node on the web GUI: https://wiki.jenkins.io/display/JENKINS/Step+by+step+guide+to+set+up+master+and+agent+machines+on+Windows
# * $ sudo apt-get install -y openjdk-14-jre-headless
# * $ sudo adduser jenkins
# * $ curl http://jenkins-master.internal/jnlpJars/agent.jar -o /home/jenkins/agent.jar
# * create systemd service: place this file in /lib/systemd/system/jenkins-agent.service
# * $ sudo systemctl enable myservice
# * $ sudo systemctl start jenkins-agent
@jforge
jforge / ansible-localhost.md
Created January 17, 2022 20:42 — forked from ryantuck/ansible-localhost.md
super fast way to start testing ansible stuff locally without VMs

set up ansible to work on localhost

i've found this useful for debugging ansible modules and syntax without having to use VMs or test in dev environments.

install ansible

pip install ansible

make some relevant config files

@jforge
jforge / setup.md
Created December 20, 2021 14:29 — forked from shirakaba/setup.md
Configuring Nexus as a private registry for npm packages

Get the details to connect to your Nexus-managed npm repository

Note: Nexus group repositories (good example in this StackOverflow question) are out of this tutorial's scope. In any case, deployment to group repositories is currently still an open issue for Nexus 3 (and not intended ever to be implemented in Nexus 2). Thus, it is assumed that we'll push & pull to/from the same repository, and ignore the idea of groups hereon in.

  1. Ask your sysadmin for a username & password allowing you to log into your organistation's Nexus Repository Manager.

  2. Test the login credentials on the Nexus Repository manager at: http://localhost:8081/nexus/#view-repositories (localhost in our case is replaced by a static IP, and can only be connected to over VPN). If your organisation requires a VPN to connect to it, connect to that VPN before proceeding with this tutori

@jforge
jforge / Arduino_Sketch_to_Adafruit_Trinket.md
Last active October 1, 2021 19:22
Sample project to measure time for a migration to a mobile solution with smaller arduino compatible board
@jforge
jforge / k3d_persistent_volumes.md
Created September 30, 2021 14:26 — forked from ruanbekker/k3d_persistent_volumes.md
Persistent Volumes with k3d/k3s

Persistent Volumes with k3d/k3s

With k3d we can mount the host to container path, and with persistent volumes we can set a hostPath for our persistent volumes. With k3d, all the nodes will be using the same volume mapping which maps back to the host.

Create the cluster:

> mkdir -p /tmp/k3dvol
> k3d create --name "k3d-cluster" --volume /tmp/k3dvol:/tmp/k3dvol --publish "80:80" --workers 2
> export KUBECONFIG="$(k3d get-kubeconfig --name='k3d-cluster')"
@jforge
jforge / 0_script.sh
Created September 24, 2021 14:12 — forked from SKalt/0_script.sh
Run a jupyter lab with json folding viewing
docker run -it -p 8888:8888 -v $(pwd):/home skalt/dev-env
# in container
jupyter labextension install @jupyterlab/json-extension
jupyter lab --ip=0.0.0.0 --port=8888 --allow-root
@jforge
jforge / how-to-publish-to-npm.md
Created July 27, 2021 13:01 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "https:/yourblog.com"

npm adduser
@jforge
jforge / elbtest-stack.ts
Created July 12, 2021 06:37 — forked from JoshM1994/elbtest-stack.ts
An AWS CDK class to create a fully deployed Elastic Beanstalk application with custom app version
import cdk = require('@aws-cdk/core');
import elasticbeanstalk = require('@aws-cdk/aws-elasticbeanstalk');
import s3assets = require('@aws-cdk/aws-s3-assets');
export class ElbtestStack extends cdk.Stack {
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// Construct an S3 asset from the ZIP located from directory up.
const elbZipArchive = new s3assets.Asset(this, 'MyElbAppZip', {
@jforge
jforge / Install OWASP ZAP headless
Created May 18, 2021 12:31 — forked from fedir/Install OWASP ZAP headless
Install headless OWASP ZAP on Ubuntu 16.04
# Java should be installed
# sudo apt-get install openjdk-7-jre-lib openjdk-7-jre-headless openjdk-7-jre icedtea-7-jre-jamvm icedtea-7-jre-cacao icedtea-7-plugin
# sudo update-alternatives --config java
mkdir ~/src/ && cd ~/src/
wget https://github.com/zaproxy/zaproxy/releases/download/2.5.0/ZAP_2.5.0_Linux.tar.gz
tar -xzvf ZAP_2.5.0_Linux.tar.gz
rsync -av ZAP_2.5.0/ /opt/zaproxy/
@jforge
jforge / A Vernemq Dockerfile
Last active April 9, 2021 10:06 — forked from SeppPenner/Dockerfile
Dockerfile for VerneMQ setup on Raspberry Pi including bridging to another broker
FROM armhf/debian:jessie
RUN apt-get update && apt-get install -y \
libssl-dev \
logrotate \
sudo \
curl \
jq \
&& rm -rf /var/lib/apt/lists/*