Skip to content

Instantly share code, notes, and snippets.

View revsbech's full-sized avatar

Jan-Erik Revsbech revsbech

View GitHub Profile
@revsbech
revsbech / docker-compose-https.yml
Created May 28, 2019 06:41
Docker file example for Sampension
version: '3.3'
services:
sslproxy:
image: fsouza/docker-ssl-proxy
ports:
- "443:443"
restart: always
environment:
DOMAIN: "api.local"
<?php
require_once('vendor/autoload.php');
use Firebase\JWT\JWT;
use phpseclib\Crypt\RSA;
use phpseclib\Math\BigInteger;
class ApiDemo {
const OpenIdConfig = "https://cognito-identity.amazonaws.com/.well-known/openid-configuration";
const CognitoIdentityKeyEndpoint = "https://cognito-identity.amazonaws.com/.well-known/jwks_uri";
public function run() {
@revsbech
revsbech / AuthenticationService.php
Last active June 12, 2017 09:02
TYPO3 JWT Test
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
<?php
if ($argc != 2) {
print "Usage:: primes.php <max>" . PHP_EOL;
exit (1);
}
$i = 1;
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: symfony
annotations:
pod.alpha.kubernetes.io/init-containers: '[{
"name": "install",
"image": "revsbech/symfonydemo",
"command": ["cp", "-a", "/var/www/application", "/app"],
"volumeMounts": [
application:
image: tianon/true
volumes:
- .:/var/www/myapp
mysql:
image: mariadb:10.1
ports:
- "3308:3306"
environment:
MYSQL_ROOT_PASSWORD:123
@revsbech
revsbech / Makefile
Last active May 9, 2016 14:37
Example of writing Neos configuration from from PCO settings json file
#
#
# The build, release and restart targets are defined in the app, and are run at different stages of the build.
# The build and release are done on the build-server (pubhub), whereas the restart are run on each webnode
#
# Notice that the pco.json conf file is not present during the build phase, but it present during release
#
build: composer rmResourcesDir
www-data@dev02:~/fkdk-latest/flow/Packages/Sites/FIT.FolkekirkenDk/Build(master⚡) » grunt watch
Running "watch" task
Waiting...
>> File "../Resources/Private/Styles/_PsalmDatabase.scss" changed.
Running "compass:dist" (compass) task
DEPRECATION WARNING:
Sass 3.5 will no longer support Ruby 1.9.3.
Please upgrade to Ruby 2.0.0 or greater as soon as possible.
container_commands:
10-flush-cache:
command: "php flow flow:cache:flush --force"
env:
FLOW_CONTEXT: Production
20-warump-cache:
command: "php flow flow:cache:warmup"
env:
FLOW_CONTEXT: Production
<?php
class Tx_MocBeer_Domain_Model_Consumer {
/**
* @var Tx_MocBeer_Domain_Service_InventoryService
* @inject
*/
protected $inventoryService;