View ApiRender.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# src/Mjml/ApiRenderer.php | |
namespace App\Mjml; | |
use Mjml\Client; | |
use NotFloran\MjmlBundle\Renderer\RendererInterface; | |
class ApiRenderer implements RendererInterface |
View remove_php.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove all php and extensions, use "brew list | grep php" to get all packages | |
brew uninstall --force --ignore-dependencies php71-xdebug php71-amqp php71 .... | |
# remove all configs | |
rm -rf /usr/local/etc/php/7.1 | |
rm -rf /usr/local/opt/php@7.1 | |
rm -rf /usr/local/share/pear | |
rm -rf /usr/local/lib/php/ | |
rm -rf /usr/local/Cellar/php@71 |
View LoggerPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Swiftmailer; | |
use Psr\Log\LoggerInterface; | |
use Swift_Events_SendEvent; | |
use Swift_Events_SendListener; | |
class LoggerPlugin implements Swift_Events_SendListener | |
{ |
View SentryExceptionCatcherProcessor.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Hexanet\Si\AppBundle\Processor\Swarrot; | |
use Swarrot\Broker\Message; | |
use Swarrot\Processor\ProcessorInterface; | |
class SentryExceptionCatcherProcessor implements ProcessorInterface | |
{ | |
/** |
View create_server.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
use OpenCloud\OpenStack; | |
use Guzzle\Http\Exception\BadResponseException; | |
$client = new OpenStack('https://auth.runabove.io/v2.0/', array( | |
'username' => '', // email | |
'password' => '', |
View Authentication.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('Authentication', function($http, $rootScope, $location, $timeout){ | |
var Auth = {}; | |
Auth.unsetUser = function() { | |
$rootScope.user = {}; | |
}; | |
Auth.setUser = function(data) { | |
$rootScope.user = data; |
View install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add - | |
echo 'deb http://packages.elasticsearch.org/logstashforwarder/debian stable main' > /etc/apt/sources.list.d/logstash-forwarder.list |
View php-amqp.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt-get install php5-dev make cmake php-pear | |
git clone git://github.com/alanxz/rabbitmq-c.git && cd rabbitmq-c | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. | |
cmake --build . --target install |
View .gitconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[url "http://git.floran.fr/"] | |
insteadOf = git@git.floran.fr: |
View php-cs-fixer-pre-commit.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP error (lint), and make sure the code | |
* is PSR compliant. | |
* | |
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
* |
NewerOlder