Skip to content

Instantly share code, notes, and snippets.

🚲
Pedaling

Jérôme Tamarelle GromNaN

🚲
Pedaling
Block or report user

Report or block GromNaN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View conversion.html
<html>
<head>
<style type="text/css">
textarea {
width: 100%;
height: 300px;
}
</style>
<script type="text/javascript" src="http://papaparse.com/resources/js/papaparse.js"></script>
<script type="text/javascript" src="conversion.js"></script>
@GromNaN
GromNaN / README.md
Last active Feb 11, 2017 — forked from andris9/README.md
Extremely simple HTTP proxy for changing Host: header Useful when proxying requests to virtual hosts that require Host: header to be set.
View README.md

Setup reverse tunnel

Run the following in your client machine

ssh -R EXPOSED_PORT:localhost:SERVICE_PORT USER@HOST

Where

  • EXPOSED_PORT is the port exposed to the internet in the proxy server
  • SERVICE_PORT is the port your application is listening in your machine
@GromNaN
GromNaN / GraphvizContainerCommand.php
Last active Jan 20, 2017
Graphviz Symfony container
View GraphvizContainerCommand.php
<?php
namespace AppBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@GromNaN
GromNaN / e107-to-joomla.sql
Last active Aug 31, 2016
Users and Forum migration from e107 to Joomla+Kunena
View e107-to-joomla.sql
SET character_set_client = utf8mb4;
SET character_set_connection = utf8mb4;
DELIMITER $$
DROP FUNCTION IF EXISTS HTML_UnEncode$$
CREATE DEFINER=`root`@`localhost` FUNCTION `HTML_UnEncode`(x VARCHAR(16383)) RETURNS varchar(16383) CHARSET utf8mb4
BEGIN
DECLARE TextString VARCHAR(16383);
@GromNaN
GromNaN / rollbar-resolve-items.php
Created Mar 14, 2016
Rollbar : Find and resolve items using the API
View rollbar-resolve-items.php
<?php
$term = 'This resource is not routable';
$read_access_token = '<READ ACCESS TOKEN>';
$write_access_token = '<WRITE ACCESS TOKEN>';
$total = 0;
do {
View gist:9081b690c9fc9e41380e
[core]
autocrlf = input
fileMode = false
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
@GromNaN
GromNaN / build.sh
Last active Aug 29, 2015
Split Composer Satis repositories into smaller packages
View build.sh
#!/bin/sh
# For each sub-package, run the Satis build command.
php bin/satis build repositories-mirrors.json ./web/mirrors
php bin/satis build repositories-pear.json ./web/pear
php bin/satis build repositoriesp-rojects.json ./web/projects
# Merge all the package files.
php web/packages.php > web/packages.json
@GromNaN
GromNaN / .htaccess
Created Jan 6, 2015
Bridge Wordpress & Symfony
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
# Symfony2 URLs begins with app or admin/dashboard
RewriteRule ^app/ app.php [QSA,L]
RewriteRule ^admin/dashboard app.php [QSA,L]
# Others requests are redirected to Wordpress
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
View gist:a00965b384fddf9f48c3
<?php
function parseJsonx(\DOMNode $node)
{
switch ($node->nodeName)
{
case 'json:object':
$data = new stdClass();
foreach ($node->childNodes as $childNode) {
if ($childNode instanceof \DOMElement
@GromNaN
GromNaN / gist:10878088
Created Apr 16, 2014
Prophecy vs PHPUnit MockObjects error messages
View gist:10878088

With Prophecy

jtamarelle@ox-dev-php ~/f/lexpress> phpunit tests/Routing/Matcher/ChainMatcherTest.php
PHPUnit 3.7.31 by Sebastian Bergmann.

Configuration read from /space/home/jtamarelle/front/lexpress/phpunit.xml.dist

.E...
You can’t perform that action at this time.