Skip to content

Instantly share code, notes, and snippets.

Avatar
🖖
hello!

Thomas rande

🖖
hello!
View GitHub Profile
View adblock
# this is custom domain to block
gfwsl.geforce.com
gfe.geforce.com
telemetry.nvidia.com
gfe.nvidia.com
telemetry.gfe.nvidia.com
events.gfe.nvidia.com
events-dc1.gfe.nvidia.com
events-dc2.gfe.nvidia.com
events-dc3.gfe.nvidia.com
View closure.go
package main
import (
"fmt"
"encoding/json"
"io/ioutil"
)
type User struct {
Name string `json:"name"`
View .gitlab-ci.yml
services: []
before_script:
- curl -sL https://github.com/rande/gitlab-ci-helper/releases/download/master/gitlab-ci-helper-linux-amd64 -o /usr/local/bin/ci-helper && chmod 755 /usr/local/bin/ci-helper
- ci-helper flowdock:status ekino "ekino jobs"
- source /root/.bashrc
stages:
- build
- test
View composer.json
{
"name": "sonata-project/sandbox",
"description": "Sonata Project's sandbox (with ecommerce bundles)",
"license": "MIT",
"autoload": {
"psr-0": { "": "src/" },
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
@rande
rande / gist:6c018e90989c965f1bfd
Created Jul 30, 2015
# docker ps -a -f name=sonata_ci
View gist:6c018e90989c965f1bfd
root@ns323614:~# docker ps -a -f name=sonata_ci
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1abefd89b163 sonata_ci_mysql:latest "/usr/sbin/mysqld" 2 seconds ago Up Less than a second 3306/tcp sonata_ci_api_mysql_165
6ff965ce8292 sonata_ci_mysql:latest "/usr/sbin/mysqld" 3 seconds ago Up 2 seconds 3306/tcp sonata_ci_api_mysql_164
a4c6c4ffec6b sonata_ci_mysql:latest "/usr/sbin/mysqld" 5 seconds ago Up 4 seconds 3306/tcp sonata_ci_api_mysql_163
9e8f2c6245b2 sonata_ci_app:latest "/etc/sonata/start.s 5 minutes ago Up 5 minutes 80/tcp sonata_ci_api_app
3a8f77e4971a sonata_ci_proxy:latest "python /project/run 5 minutes ago Up 5 minutes 3306/tcp, 6666/tcp sonata_ci_api_proxy
dac3ca289278 sonata_ci_mysql:latest "/usr/sbin/mysqld
View gist:c767353e5bdf8bb91ec3
PHP Deprecated: The Symfony\Component\Security\Core\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Core\Authorization\AuthorizationChecker instead. in /vagrant/php/sonata-sandbox-2-4-develop/vendor/symfony/symfony/src/Symfony/Component/Security/Core/SecurityContext.php on line 14
PHP Deprecated: The Symfony\Component\Security\Core\SecurityContextInterface interface is deprecated since version 2.6 and will be removed in 3.0. in /vagrant/php/sonata-sandbox-2-4-develop/vendor/symfony/symfony/src/Symfony/Component/Security/Core/SecurityContextInterface.php on line 14
PHP Deprecated: The Symfony\Component\DependencyInjection\Definition::getFactoryService method is deprecated since version 2.6 and will be removed in 3.0. in /vagrant/php/sonata-sandbox-2-4-develop/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php on line 226
PHP Deprecated: T
View gist:55a4338badbad89e46b3
<?php
$array = ['toto' => 1];
$array['titi'] = &$array['toto'];
function is_ref($a, $k) {
$b = $a;
$v = $a[$k];
$h = (object)[];
View gist:9c0cfbd751d3e64b893f

Contribution Note

Thanks for your reporting, you seems to used a mix of stable and unstable dependencies from the Sonata Project. This situation can lead to unexpected errors while features are being implemented on some bundles and not yet tagged as stable.

So either you should only use stable components, or willing to get some potentials bugs.

If you want to get a sneak peek of what's coming on Sonata Project, you can refer to this composer: https://github.com/sonata-project/sandbox/blob/2.4-develop/composer.json and also to the configuration available for Sonata's Bundle: https://github.com/sonata-project/sandbox/tree/2.4-develop/app/config/sonata

@rande
rande / stubRouterContext.js
Created Feb 4, 2015
Stub For React Router
View stubRouterContext.js
/**
* From https://github.com/rackt/react-router/blob/master/docs/guides/testing.md
*
* var stubRouterContext = require('./stubRouterContext');
* var IndividualComponent = require('./IndividualComponent');
* var Subject = stubRouterContext(IndividualComponent, {someProp: 'foo'});
* React.render(<Subject/>, testElement);
*/
var React = require('react');
View composer error
➜ media-bundle git:(master) composer install --dev --prefer-source
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sonata-project/doctrine-phpcr-admin-bundle 1.1.0 requires doctrine/phpcr-odm ~1.1 -> satisfiable by doctrine/phpcr-odm[1.1.0, 1.1.1, 1.1.2].
- sonata-project/doctrine-phpcr-admin-bundle 1.1.1 requires doctrine/phpcr-odm ~1.1 -> satisfiable by doctrine/phpcr-odm[1.1.0, 1.1.1, 1.1.2].
- sonata-project/doctrine-phpcr-admin-bundle 1.0.0 requires doctrine/phpcr-odm 1.0.* -> satisfiable by doctrine/phpcr-odm[1.0.0, 1.0.1].
- sonata-project/doctrine-phpcr-admin-bundle 1.0.1 requires doctrine/phpcr-odm 1.0.* -> satisfiable by doctrine/phpcr-odm[1.0.0, 1.0.1].