Skip to content

Instantly share code, notes, and snippets.

View jaymecd's full-sized avatar

Nikolai Zujev jaymecd

View GitHub Profile
@jaymecd
jaymecd / periodic-time-ticker.php
Created April 14, 2017 17:48 — forked from Ocramius/periodic-time-ticker.php
A PHP long running process that fires a command at a command bus at regular time intervals
#!/usr/bin/env php
<?php
declare(strict_types=1);
namespace CodeReviewsIo\Worker;
use CodeReviewsIo\Domain\Command\TickTime;
use Prooph\ServiceBus\CommandBus;
use React\EventLoop\Factory;
@jaymecd
jaymecd / example.php
Created March 20, 2017 21:20 — forked from hikari-no-yume/example.php
function chaining for PHP 7
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
@jaymecd
jaymecd / Twelve_Go_Best_Practices.md
Created February 13, 2017 10:13 — forked from pzurek/Twelve_Go_Best_Practices.md
Twelve Go Best Practices
@jaymecd
jaymecd / Caddyfile
Created December 19, 2016 23:54 — forked from phred/Caddyfile
A+ grade on securityheaders.io with this: https://securityheaders.io/?q=https%3A%2F%2Ffff.red
fff.red {
header / {
Strict-Transport-Security "max-age=31536000; includeSubDomains"
Content-Security-Policy "default-src https:*"
Public-Key-Pins "pin-sha256=\"ckOIjdimiwD3mfMmkmCh7uiJCBtXvoqoBoKKB1K5UIM=\"; pin-sha256=\"QiTyymM4e635OgWkx9d7nq5xvEuqmgV7HiDjIIGyymo=\"; max-age=2592000"
X-Frame-Options SAMEORIGIN
X-XSS-Protection "1; mode=block"
X-Content-Type-Options nosniff
}
}
@jaymecd
jaymecd / golang_job_queue.md
Created November 12, 2016 13:10 — forked from harlow/golang_job_queue.md
Job queues in Golang
@jaymecd
jaymecd / redirectExample.go
Created October 11, 2016 21:20 — forked from d-schmidt/redirectExample.go
How to redirect HTTP to HTTPS with a golang webserver.
package main
import (
"net/http"
)
func redirect(w http.ResponseWriter, req *http.Request) {
http.Redirect(w, req,
"https://" + req.Host + req.URL.String(),
http.StatusMovedPermanently)
}
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
06/2016 OR 08/2018 737 7373
@jaymecd
jaymecd / clover-merge.php
Created August 30, 2016 18:57 — forked from YarekTyshchenko/clover-merge.php
Clover XML Merger
<?php
$options = getopt("f:o:");
if (! isset($options['f'])) {
echo "Files have to be specified with -f\n";
exit(1);
}
if (! isset($options['o'])) {
echo "Output has to be specified with -o\n";
exit(1);
}
FROM ubuntu:16.04
RUN PACKAGES="\
php-cli \
php-mysql \
php-intl \
php-xml \
php-curl \
php-dom \
" && \