Skip to content

Instantly share code, notes, and snippets.

View ScullWM's full-sized avatar
🌶️
Caramba! PepperReport.io!

Thomas P ScullWM

🌶️
Caramba! PepperReport.io!
View GitHub Profile
@ScullWM
ScullWM / Gruntfile.js
Created May 19, 2021 21:00
Gruntfile configuration
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
uglify: {
js_path: {
files: {
'public/js/site.min.js': [
'public/assets/site/js/boostrap.min.js',
'public/assets/site/js/cookie.js',
'public/assets/site/js/jquery.backstretch.min.js',
Travaux\VariantRetriever\Retriever\VariantRetrieverInterface:
class: Travaux\VariantRetriever\Retriever\VariantRetriever
calls:
- addExperiment:
- !service
class: Travaux\VariantRetriever\ValueObject\Experiment
arguments:
- 'welcome-email-experiment'
- !service
class: Travaux\VariantRetriever\ValueObject\Variant
@ScullWM
ScullWM / services.yaml
Last active October 9, 2020 13:44
Service definition file: config/services.yaml
services:
App\FeatureFlag\VariantRetriever:
factory: ['@Travaux\VariantRetriever\Factory\VariantRetrieverFactory', 'createVariantRetriever']
public: true
arguments:
- welcome-email-experiment:
- control-email: 50
- participant-email: 50
- display-cta:
- control-cta: 75
@ScullWM
ScullWM / BodySubscriber.php
Last active January 6, 2020 10:36
Body json
<?php
namespace App\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@ScullWM
ScullWM / api-template.html
Created June 3, 2019 20:06
Snowboard bootstrap template
<div class="row">
<div class="col-md-3">
{{template "Navigation" .}}
</div>
<div class="col-md-9">
{{template "ResourceGroups" .}}
</div>
</div>
<?php
namespace App\Doctrine;
use Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.
*/
<?php
namespace App\Doctrine\Driver;
use Doctrine\DBAL\Schema\PostgreSqlSchemaManager;
use Doctrine\DBAL\Schema\Sequence;
class Postgre10SqlSchemaManager extends PostgreSqlSchemaManager
{
/**
<?php
namespace App\Doctrine\Driver;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\PDOPgSql\Driver as ParentDriver;
use App\Doctrine\Driver\Postgre10SqlSchemaManager;
use App\Doctrine\PostgreSQL100Platform;
class PDOPgSqlDriver extends ParentDriver implements Driver
package main
import (
"encoding/csv"
"fmt"
"github.com/traildb/traildb-go"
"log"
"os"
)
package main
import (
"crypto/md5"
"encoding/hex"
"fmt"
"github.com/traildb/traildb-go"
"golang.org/x/blog/content/context/userip"
"gopkg.in/yaml.v2"
"io/ioutil"