Skip to content

Instantly share code, notes, and snippets.

View andho's full-sized avatar

Amjad Mohamed andho

View GitHub Profile
@andho
andho / logging.php
Created December 12, 2019 03:10
config/logging.php with gelf config.
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------

Keybase proof

I hereby claim:

  • I am andho on github.
  • I am andho (https://keybase.io/andho) on keybase.
  • I have a public key ASAK0Wy7c3kXgiZBiFeQNNcXCpQEMQbHCR3dhlAeQgEFUwo

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 1ANvqvSYdjiDDFh5YAMMHJRnrWrgmSBoM9 https://explorer.blockstack.org/address/1ANvqvSYdjiDDFh5YAMMHJRnrWrgmSBoM9
@andho
andho / Dockerfile
Created October 12, 2016 04:05
Docker curl with http2 support. Base ubuntu 16.04. I built this for accessing APNS http2 from PHP
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
git \
g++ make binutils autoconf automake autotools-dev libtool pkg-config \
zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \
libjemalloc-dev cython python3-dev python-setuptools
@andho
andho / date_floor.php
Created November 30, 2012 12:47
Kindah rounds off dates
<?php
$defaults = array(
'month' => 'january',
'day' => 1,
'hour' => 0,
'minute' => 0,
'second' => 0
);
@andho
andho / shift_update.php
Created November 29, 2012 05:32 — forked from FoxRocks76/updated code
code for andho
<?php
if(isset($_POST['submit']))
{
if(isset($_POST['offdays']))
{
//$off is set through the config settings//
$shift = $_POST['shift'];
$from = $_POST['from'];
$to = $_POST['to'];
@andho
andho / shift_update.php
Created November 29, 2012 04:21 — forked from FoxRocks76/updated code
code for andho
$sql = ("UPDATE schedule SET Shift_ID = '$shift' WHERE (`Date` BETWEEN '$from' AND '$to') AND (Emp_ID = '$emp_id')");
if(!$result_shift_update_query = $mysqli->query($sql))
{
echo "INSERT ERROR 1 HERE";
}
echo "Shift UPDATE SQL: " . $sql . "<br><br>";//error checking
$sql = ("SELECT `Date` FROM schedule WHERE (`Date` BETWEEN '$from' AND '$to') AND (Emp_ID = '$emp_id')");
@andho
andho / gist:3601439
Created September 2, 2012 16:52
merge conflict
/**
* Invokes a matcher or proxies the method call to the intercepted object
* magic call method, if one exists
*
* @param string $method
* @param array $args
* @return boolean|mixed
*/
public function __call($method, $args)
@andho
andho / querystring.php
Created April 19, 2012 17:56
Convert associative array into a query string
<?php
$params = array(
'query' => 'something',
'page' => 1,
'items' => 10
);
$url = 'http://someapi.com/search';
@andho
andho / composer.json
Created February 20, 2012 15:08
composer intro sample
{
"require": {
"phpunit/phpunit": "=3.5"
}
}