Skip to content

Instantly share code, notes, and snippets.

View twmbx's full-sized avatar
🇿🇲

Twaambo Haamucenje twmbx

🇿🇲
View GitHub Profile
<?php
date_default_timezone_set('Africa/Nairobi');
// set up db connection
include("connection.php")
$TenantTransactionId = $_GET["TransactionType"];
$SESSIONID = $_GET["SESSIONID"];
$SERVICECODE = $_GET["SERVICECODE"];
$ApplicationID = $_GET["ApplicationID"];
$USSD_string = $_GET["USSD_string"];
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@karllhughes
karllhughes / compose.yml
Last active April 8, 2021 06:57
laravel php docker compose file
version: "2"
services:
web:
image: karllhughes/php-fpm-mysql:latest
restart: always
links:
- database
- redis
env_file:
@bekarice
bekarice / filter-wc-orders-by-gateway.php
Last active August 3, 2023 13:37
Filters WooCommerce Orders by Payment Gateway Used
<?php
/**
* Plugin Name: Filter WooCommerce Orders by Payment Method
* Plugin URI: http://skyverge.com/
* Description: Filters WooCommerce orders by the payment method used :)
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: wc-filter-orders-by-payment
*
@daverockz
daverockz / ussdAppSample.php
Created December 4, 2016 23:26
sample php ussd app
<?php
$ussdRequest = json_decode(@file_get_contents('php://input'));
$ussdResponse = new stdclass;
if ($ussdRequest != NULL)
switch ($ussdRequest->Type) {
case 'Initiation':
$ussdResponse->Message =
<?php
$ussdRequest = json_decode(@file_get_contents('php://input'));
if($ussdRequest != NULL);
$ussdResponse = new stdClass;
switch($ussdRequest->Type){
case "Initiation":
@electerious
electerious / Caddyfile
Created August 20, 2016 18:15
Most complete list of mime types in the correct format for the Caddy mime directive
mime {
.atom application/atom+xml
.json application/json
.map application/json
.topojson application/json
.jsonld application/ld+json
.rss application/rss+xml
.geojson application/vnd.geo+json
.rdf application/xml
.xml application/xml
@abel-masila
abel-masila / index.php
Created July 13, 2016 09:16
A simple USSD registration application written in PHP
<?php
/* Simple sample USSD registration application
* USSD gateway that is being used is Africa's Talking USSD gateway
*/
// Print the response as plain text so that the gateway can read it
header('Content-type: text/plain');
/* local db configuration */
$dsn = 'mysql:dbname=dbname;host=127.0.0.1;'; //database name
@andrejIka
andrejIka / awesm.md
Created June 10, 2016 19:12 — forked from matula/awesm.md
Awesome PHP stuff in one Gist
@matula
matula / awesm.md
Last active February 19, 2024 16:23
Awesome PHP stuff in one Gist