Skip to content

Instantly share code, notes, and snippets.

Avatar

Twaambo Haamucenje twmbx

View GitHub Profile
View ussd_app.php
<?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 Sep 25, 2022
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@karllhughes
karllhughes / compose.yml
Last active Apr 8, 2021
laravel php docker compose file
View compose.yml
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 Apr 2, 2022
Filters WooCommerce Orders by Payment Gateway Used
View filter-wc-orders-by-gateway.php
<?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
*
View ussdAppSample.php
<?php
$ussdRequest = json_decode(@file_get_contents('php://input'));
$ussdResponse = new stdclass;
if ($ussdRequest != NULL)
switch ($ussdRequest->Type) {
case 'Initiation':
$ussdResponse->Message =
View ussd-app.php
<?php
$ussdRequest = json_decode(@file_get_contents('php://input'));
if($ussdRequest != NULL);
$ussdResponse = new stdClass;
switch($ussdRequest->Type){
case "Initiation":
@electerious
electerious / Caddyfile
Created Aug 20, 2016
Most complete list of mime types in the correct format for the Caddy mime directive
View Caddyfile
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 Jul 13, 2016
A simple USSD registration application written in PHP
View index.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 Jun 10, 2016 — forked from matula/awesm.md
Awesome PHP stuff in one Gist
View awesm.md
@matula
matula / awesm.md
Last active Jul 14, 2022
Awesome PHP stuff in one Gist
View awesm.md