Skip to content

Instantly share code, notes, and snippets.

@ftntming
ftntming / Jest_GitLab_CI.md
Created September 30, 2023 00:47 — forked from rishitells/Jest_GitLab_CI.md
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@ftntming
ftntming / wildfly-cli
Created September 30, 2022 01:34 — forked from gustavoapolinario/wildfly-cli
wildfly-cli / jboss-cli
wildfly-cli / jboss-cli common commands
# Connect into wildfly/jboss cli (only with wildfly up)
$JBOSS_HOME/bin/jboss-cli.sh --connect
# Wildfly cli offline
$JBOSS_HOME/bin/jboss-cli.sh --commands="embed-server,$COMMAND,stop-embedded-server"
# Commands:
/system-property=VAR_NAME:add(value=VAR_VALUE)
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
labels:
run: infinispan-server
name: infinispan-server
namespace: default
@ftntming
ftntming / nginx_deployment.yaml
Created June 30, 2022 16:23 — forked from petitviolet/nginx_deployment.yaml
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@ftntming
ftntming / s3upload.sh
Last active October 21, 2021 02:15 — forked from ryantbrown/s3upload.sh
Bash script to Upload folder to S3
# Set AWS credentials and S3 paramters
AWS_KEY=""
AWS_SECRET=""
S3_BUCKET=""
S3_BUCKET_PATH="/"
S3_ACL="x-amz-acl:private"
function s3Upload
{
path=$1
package main
import (
"fmt"
"log"
"time"
"github.com/gomodule/redigo/redis"
)
@ftntming
ftntming / install-kafka.txt
Created April 1, 2021 17:00 — forked from jarrad/install-kafka.txt
Install Kafka on OSX via Homebrew
$> brew cask install java
$> brew install kafka
$> vim ~/bin/kafka
# ~/bin/kafka
#!/bin/bash
zkServer start
kafka-server-start.sh /usr/local/etc/kafka/server.properties
@ftntming
ftntming / mod_http_upload-nginx_reverse_proxy.md
Created March 2, 2021 09:19 — forked from imShara/mod_http_upload-nginx_reverse_proxy.md
Ejabberd (19.08+) mod_http_upload and Nginx reverse-proxy

If we have xmpp server on host domain.tld and want serve files from https://xmpp.domain.tld/upload/…

/etc/ejabberd/ejabberd.yml


listen
  port: 5280
  ip: "127.0.0.1"
 module: ejabberd_http
package org.keycloak.authentication.authenticators.browser;
import org.keycloak.authentication.AuthenticationFlowContext;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import javax.ws.rs.core.MultivaluedMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
@ftntming
ftntming / OpenamRESTapi
Created September 2, 2020 07:47 — forked from burck1/OpenamRESTapi
OpenAM REST api summary
Ref: http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#chap-rest
Authentication - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-auth-json
Token Validation - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-token-validation
User Self Registration - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-self-registration
Reseting Forgotten Passwords - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-password-reset
Identity Management - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-crud-identity
Login v1: