Skip to content

Instantly share code, notes, and snippets.

View thecraftman's full-sized avatar
🙂
Available

Ore-Aruwaji Tola thecraftman

🙂
Available
View GitHub Profile
@thecraftman
thecraftman / packetbeat-redis.yml
Created June 8, 2021 16:51
Capture the network traffic from Redis layer protocol using Packetbeat
# Disable index lifecycle management (ILM)
setup.ilm.enabled: false
# network device to capture traffic from
packetbeat.interfaces.device: en0
# Configure the maximum size of the packets to capture
packetbeat.interfaces.snaplen: 44937833987
# Configure Sniffing & traffic capturing options
packetbeat.interfaces.type: pcap
# Configure the maximum size of the shared memory buffer to use
packetbeat.interfaces.buffer_size_mb: 400
@thecraftman
thecraftman / table.md
Last active May 30, 2021 03:52
SQL vs NoSQL
SQL NoSQL
When your access patterns aren't defined When your access pattern is defined.
When you want to perform flexible queries. If your access patterns arent define you won't know what queries to perform. When your primary key is known.
When you want to perform relational queries. When your data model fits (graphs)
When you want to enforce field constraints, this allows you to keep your data consistent. High efficiency Scaling
When you want to use a documented access language (SQL) is generally universal across all the Relational Database Engines. When you need high performance and low latency.
Data use Schemes Schema-less
Relations! No (very few) Relations
Data is distributed across multiple tables Data is typically merged and nested in a few collections
@thecraftman
thecraftman / heartbeat.yaml
Created May 26, 2021 19:03
Heartbeat Configuration
# Disable index lifecycle management (ILM)
setup.ilm.enabled: false
heartbeat.monitors:
- type: icmp
schedule: '*/5 * * * * * *'
hosts: ["myhost"]
id: my-icmp-service
name: My ICMP Service
- type: tcp
@thecraftman
thecraftman / env.yaml
Created May 18, 2021 15:22
Add the environment variable values for your Axiom host, dataset, and the ingest token.
env:
- name: AXIOM_HOST
value: http://cloud.axiom.co // replace with your self-host url if needed
- name: AXIOM_DATASET_NAME
value: aks-logs
- name: AXIOM_INGEST_TOKEN
value: xait-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
@thecraftman
thecraftman / pythongenerator.py
Created May 13, 2021 14:56
Randomly create passwords in Python using the Input variable
# Before running this code, make sure you have Python 3 and above Installed on your machine.
# Run the file using python3 pythongenerator.py
# Creating a password generator in Python
# string library to generate the password
import string
# generate secure and random passwords
import random
@thecraftman
thecraftman / logstash.conf
Last active May 11, 2021 09:03
Logstash → Axiom Configuration
input{
exec{
command => "date"
interval => "1"
}
}
output{
elasticsearch{
hosts => ["$YOUR_AXIOM_URL:443/api/v1/datasets/<dataset>/elastic"]
# api_key can be your ingest or personal token
@thecraftman
thecraftman / Tola-CLA.md
Last active December 13, 2020 17:15
Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, the open source project Tola ("Tola") must have a Contributor License Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Tola and its users; it does not change your rights to use your own Contributions for any other purpose. This Agreement allows an individual or an entity to submit Contributions to Tola, to authorize Contributions submitted by its designated employees to Tola, and to grant copyright and patent licenses. thereto. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Tola. Except for the license granted herein to Tola and recipients of software distributed by Tola, You reserve all right, title, and interest in and to Your Contributions. Definitions. "You" (or "Your") shall mean the cop

@thecraftman
thecraftman / README.md
Created July 28, 2020 03:37
Configuring the Python environment on WSL & Windows machine

Virtual Environment

  1. Create the venv and fix permissions:

    sudo virtualenv --python=python3 ~/weblate-env
    sudo chown -R {YOUR USERNAME}:{YOUR USERNAME} /home/{YOUR USERNAME}/weblate-env-2
    
@thecraftman
thecraftman / README.md
Last active October 19, 2023 22:46
Windows Subsystem for Linux
@thecraftman
thecraftman / README.md
Last active July 26, 2020 23:06
Translation workflow using GitLocalize

GitLocalize

GitLocalize is a Translation service tool used for GitHub repos. It is a continuous localization tool built for teams who want to improve and streamline their project workflow when translating their content. GitLocalize automatically syncs with your Github repository so your workflow can be maintained and integrated on Github.

Why GitLocalize?

  • GithubLocalize is completely free, this feature makes it easier for the user to integrate a lot of projects.

  • Projects can easily be integrated with Github when synced with the repo, it tracks changes in the repository and pulls them into the projects which are synced back to the repo (branch) via a pull request.