Skip to content

Instantly share code, notes, and snippets.

View arn-ob's full-sized avatar
☠️
__worker__

Arnob arn-ob

☠️
__worker__
View GitHub Profile
@arn-ob
arn-ob / create-csv.sh
Created February 19, 2023 07:37 — forked from vaughany/create-csv.sh
Little bash script to create a CSV file containing many thousands of fake (but valid) URLs.
#!/bin/bash
# Each 'run' generates 10 unique URLs, so if RUNS=10 you'll get 100 lines out.
# Requires `gpw` to be installed, as a source for nice, random strings.
FILE=large-test.csv
RUNS=10000
if test -f "$FILE"; then
truncate -s 0 $FILE
@arn-ob
arn-ob / prepareElastic.js
Created January 4, 2023 12:39 — forked from stekhn/prepareElastic.js
Creates and prepares an Elasticsearch index, using the Node.js client. Closes the index before putting settings and mappings. The response and error handlers are optional, remove them if necessary.
var elastic = require('elasticsearch');
var client = new elastic.Client({ host: 'localhost:9200' });
var index = 'myindex';
var type = 'document';
(function init() {
Promise.resolve()
.then(deleteIndex, handleError)
@arn-ob
arn-ob / project.yaml
Created December 20, 2022 06:12
Project yaml
name: Project Production
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
@arn-ob
arn-ob / ssr-fetch-prod.yaml
Created December 20, 2022 05:36
actions/checkout repository action
name: ssr-fetch prod
on:
push:
branches:
- main
jobs:
Deploy:
name: ssr-fetch Deploy
@arn-ob
arn-ob / filebeat-autodiscover-kubernetes.yml
Created November 22, 2022 08:50 — forked from exekias/filebeat-autodiscover-kubernetes.yml
Example of autodiscover usage in filebeat-kubernetes.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
kubernetes.io/cluster-service: "true"
data:
@arn-ob
arn-ob / ingress.yaml
Created November 21, 2022 05:08
Ingress Networking
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: elastic-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/proxy-ssl-verify: "false"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
@arn-ob
arn-ob / kibana.yaml
Created November 21, 2022 05:06
kibana yaml
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: quickstart
spec:
version: 8.5.1
count: 1
elasticsearchRef:
name: quickstart
http:
@arn-ob
arn-ob / exp-app.yaml
Last active November 12, 2022 09:29
App Service and Deployement
apiVersion: v1
kind: Service
metadata:
name: exp-app-service
spec:
selector:
app: exp-app
ports:
- protocol: "TCP"
port: 80
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: default
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
@arn-ob
arn-ob / refreash_helm.sh
Created November 9, 2022 06:01 — forked from naotookuda/refreash_helm.sh
How to refresh "helm" cache ?
# !/bin/bash
# Remove all files in these directories.
rm -rf ~/.helm/cache/archive/*
rm -rf ~/.helm/repository/cache/*
# Refreash repository configurations
helm repo update
#That's all.
#If you "helm search" next time, you can find newest stable charts in repository.