Skip to content

Instantly share code, notes, and snippets.

View jforge's full-sized avatar

jforge

  • Germany, Bargteheide
  • 07:56 (UTC +02:00)
View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active September 10, 2026 11:49
set -e, -u, -o, -x pipefail explanation
@parente
parente / README.md
Last active November 30, 2022 04:44
Jupyter Tidbit: Kernels for text files in JupyterLab

Summary

You can associate a Console panel and kernel with a text editor in JupyterLab, and use it to execute selected code, RStudio style.

  1. Create or open a text source file in JupyterLab.
  2. Right click in the text editor panel.
  3. Click Create Console for Editor.
  4. Select a kernel matched to the programming language you want to execute in the file.
  5. Notice the Console panel that appears.
  6. Highlight one or more lines back in the text editor you'd like to run.
@DevoKun
DevoKun / kafka.md
Created July 13, 2018 02:52
How to operate Kafka, mostly using Docker

Kafka Distributed Streaming Platform

Publish and Subscribe / Process / Store

Start Kafka

  • Kafka uses ZooKeeper as a distributed backend.

Start Zookeeper

@SeppPenner
SeppPenner / Dockerfile
Last active April 9, 2021 10:05
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/*
@dabit3
dabit3 / index.js
Last active December 29, 2021 06:38
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',
}
})
@adisbladis
adisbladis / pkijs-decode-pem-node.js
Created May 10, 2018 03:04
Minimal example of loading a PEM certificate using pkijs (in nodejs)
#!/usr/bin/env node
// Minimal example of loading a PEM certificate using pkijs (in node)
// babel-polyfill needs to be loaded for pkijs
// It uses webcrypto which needs browser shims
require('babel-polyfill')
const Pkijs = require('pkijs')
const Asn1js = require('asn1js')
const FS = require('fs')
@jforge
jforge / tar.go
Created March 28, 2018 08:28 — forked from jonmorehouse/tar.go
Quick golang script for creating a gzipped tarball
package main
import (
"os"
"archive/tar"
"log"
"io"
"compress/gzip"
)
@shirakaba
shirakaba / setup.md
Last active October 5, 2025 13:54
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

@TotallyInformation
TotallyInformation / README.md
Created September 29, 2017 22:22
UIbuilder with MoonJS - simple, responsive UI

Here is a quick example using UIbuilder which is an alternative UI for Node-RED.

It demonstrates the use of a lightweight front-end library, MoonJS, which can be a lot faster and easier to work with than Node-RED's built-in Dashboard UI once you reach the point of needing to customise the UI beyond the standard capabilities of Dashboard.

This is a really quick demo of what you can do with uibuilder. MoonJS is a lightweight alternative to the likes of Angular (used by Dashboard), REACT, VueJS, etc. It is fast and really easy to use.

Here are the steps to set up (details given below):

  1. Install MoonJS & uibuilder using npm
@posener
posener / go-shebang-story.md
Last active July 8, 2026 09:14
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.