Skip to content

Instantly share code, notes, and snippets.

View n3b0r's full-sized avatar

Víctor Guerrero n3b0r

View GitHub Profile
@n3b0r
n3b0r / values.yaml
Last active November 17, 2022 11:51
Custom params to deploy Prometheus with helm chart on IBM cloud
server:
persistentVolume:
mountPath: /opt/ibm/data
storagePath: /home/cfgstore/icn/data
nodeExporter:
podAnnotations: {
prometheus.io/scrape: "true" # delete to disable Sysdig auto discovery service.
}
# helm install prometheus prometheus-community/prometheus -n prometheus -f values.yaml
@n3b0r
n3b0r / prometheus.yaml
Last active November 15, 2022 18:50
Custom ConfigMap for Sysdig Monitor Agent to collect kubelet metrics
# edit via `kubectl edit configmap sysdig-agent -n monitoring`
apiVersion: v1
data:
dragent.yaml: |
new_k8s: true
k8s_cluster_name: XXXXXX # i.e: foo-cluster
security:
enabled: true
commandlines_capture:
@n3b0r
n3b0r / prometheus.yaml
Created November 10, 2022 14:13
Prometheus Win Server config file prometheus.yaml
global:
scrape_interval: 10s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
remote_write:
- url: "https://api.sysdigcloud.com/prometheus/remote/write"
bearer_token: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
scrape_configs:
- job_name: "windows_exporter"
# metrics_path defaults to '/metrics'
@n3b0r
n3b0r / config.yaml
Created November 10, 2022 13:55
Windows exporter config.yaml file
# Configuration and more info
# https://github.com/prometheus-community/windows_exporter
collectors:
enabled: cpu,cs,logical_disk,os,system,textfile,net,service,process
collector:
textfile:
directory: C:\Users\Administrator.WINDOWS-VM-MONI\Desktop\metrics\
# service:
# services-where: "Name='windows_exporter'"
@n3b0r
n3b0r / slack.py
Created April 15, 2021 22:24
Pure Python script to delete all files on the Slack workspace.
# Use this script to recursively delete all the files present on the authorized workspace.
# The aim of this script it continues using the free Slack tier.
# WARNING: This will delete ALL your files
import requests
import json
file_list = "https://slack.com/api/files.list"
file_delete = "https://slack.com/api/files.delete"
headers = {"Authorization": "Bearer SLACK API KEY"}
@n3b0r
n3b0r / PrestashopValetDriver.php
Last active June 13, 2023 10:40
Prestashop 8 Laravel Valet driver
<?php
namespace Valet\Drivers\Custom;
use Valet\Drivers\ValetDriver;
class PrestaShopValetDriver extends ValetDriver
{
public static $ps_exclusions = ['ajax.php', 'dialog.php', 'ajax_products_list.php', 'autoupgrade/', 'filemanager/'];
@n3b0r
n3b0r / team.php
Last active July 4, 2019 15:03
Enable hover image in team members component for Enfold WordPress theme
<?php
/**
* Team Member
*
* Display a team members image with additional information
*/
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
if ( !class_exists( 'avia_sc_team' ) )
@n3b0r
n3b0r / team.php
Created July 4, 2019 15:03
Enable hover image in team members component for Enfold WordPress theme
<?php
/**
* Team Member
*
* Display a team members image with additional information
*/
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
if ( !class_exists( 'avia_sc_team' ) )
@n3b0r
n3b0r / install.sh
Last active February 13, 2019 11:26 — forked from solar/install.sh
Install redis with supervisord
#!/bin/sh
apt update
apt get install supervisor -y
echo "[program:redis]
command=/usr/bin/redis-server /etc/redis/redis.conf
autostart=true
autorestart=true
user=root
@n3b0r
n3b0r / Custom sorin theme for zprecto
Last active February 9, 2019 14:09
This is a custom setup for Sorin theme for zprezto ZSH framwork
# Screenshot: https://i.imgur.com/yUplymA.png
# Git it's integrated
# Author: vguerrero
# WS: https://vguerrero.com
# @: v @ vguerrero.com
# Code
# Load dependencies.