Skip to content

Instantly share code, notes, and snippets.

View jamesdube's full-sized avatar
🛰️
To the moon

James Dube jamesdube

🛰️
To the moon
View GitHub Profile

Omega Airtime API Documentation

Overview

This documentation covers the external API endpoints for airtime selling flows in the Cronos system. These APIs are designed for external clients to integrate airtime recharge functionality.

Base URL

http://api.omega.sendai.co.zw
@jamesdube
jamesdube / haproxy-redirect-base-on-payload
Created July 17, 2025 18:15 — forked from ledangtuanbk/haproxy-redirect-base-on-payload
Haproxy redirect request base on body
Based on this guide
https://stackoverflow.com/questions/23259843/how-to-route-traffic-reverse-proxy-with-haproxy-based-on-request-body
frontend http-in
bind *:80
option http-buffer-request
acl redirect_pingpong req.body -m reg [insert your regular expression here]
use_backend pingpong_backend if redirect_pingpong
default_backend web_bk
@jamesdube
jamesdube / mysql-docker.sh
Created December 31, 2024 02:18 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@jamesdube
jamesdube / README.md
Created March 18, 2022 16:44 — forked from int128/README.md
Example of Envoy TCP Proxy
package main
import (
"fmt"
"time"
"github.com/tsenart/vegeta/lib"
)
func testRate(rate int, sla time.Duration) bool {
@jamesdube
jamesdube / ansible-group-ips.yml
Created December 14, 2021 08:00
Extract all ip's from an ansible group
- hosts: all
name: get group ips in one line
gather_facts: false
vars:
all_servers_ip: "{{groups['all'] | map('extract',hostvars,['ansible_ssh_host']) | join(',') }}"
tasks:
- debug:
msg: "{{all_servers_ip}}"
@jamesdube
jamesdube / Build_seed_iso
Created November 12, 2021 20:57 — forked from asvignesh/Build_seed_iso
Samples to create a cloud-init configuration ISO.
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
stages:
- build
- push
- cleanup
build:
stage: build
variables:
REGISTRY_SERVER: foo.bar
IMAGE_NAME: vrutkovs-public/openshift-ansible-testing
@Component
public class LogFilter extends OncePerRequestFilter {
private static Logger LOG = LoggerFactory.getLogger(LogFilter.class);
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
LOG.info(request.getRequestURI()); // log the request path.
}
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://localhost:7013","description":"Generated server url"}],"paths":{"/api/v0/balances/msisdn/{msisdn}":{"get":{"tags":["balance-enquiry-controller"],"operationId":"enquire","parameters":[{"name":"msisdn","in":"path","required":true,"schema":{"type":"string"}},{"name":"productCode","in":"query","required":false,"schema":{"type":"string"}},{"name":"unitType","in":"query","required":true,"schema":{"type":"string"}},{"name":"accountCode","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListEnquiryAccountBalance"}}}}}}}},"components":{"schemas":{"ApiResponseListEnquiryAccountBalance":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EnquiryAccountBalance"}},"success":{"type":"boolean"},"httpStatusCode":{"type":"integer","format":"int32"},"message":{"type":"string"},