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
### Keybase proof | |
I hereby claim: | |
* I am damienalexandre on github. | |
* I am damienalexandre (https://keybase.io/damienalexandre) on keybase. | |
* I have a public key ASCu143W_WWJX8WQ0pNHfTsGiOywQiwcj9YtZHNOUBAzHAo | |
To claim this, I am signing this object: |
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 AppBundle\Tests; | |
use Doctrine\ORM\Tools\SchemaTool; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | |
/** | |
* Use Doctrine default entity manager and compare it's metadata to the actual database schema. | |
* |
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 AppBundle\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
class ProfilerController extends Controller |
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 | |
/** | |
* Secret Santa Generator - powered by PHP Generators for the lolz. | |
*/ | |
$players = [ | |
"[email protected]", | |
"[email protected]", | |
"[email protected]", | |
"[email protected]", |
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
text: Calendrier de l'Afsy, avec des Bundles indexés. | |
analyzer: | |
custom_french_analyzer: | |
type: custom | |
tokenizer: letter | |
filter: ["asciifolding", "lowercase", "french_stem", "stop_fr"] | |
filter: | |
stop_fr: | |
type: "stop" |
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
curl -XDELETE 'http://localhost:9200/pony_index_tmp' | |
curl -XPUT 'http://localhost:9200/pony_index_tmp' -d ' | |
{ | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
}' | |
curl -XPUT 'http://localhost:9200/pony_index_tmp/post/_mapping' -d ' |
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
curl -XDELETE 'http://localhost:9200/pony_index_tmp' | |
curl -XPUT 'http://localhost:9200/pony_index_tmp' -d ' | |
{ | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
}' | |
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 | |
use JoliTypo\Fixer; | |
$fixer = new Fixer(array("FrenchQuotes", "FrenchNoBreakSpace")); | |
$fixed_content = $fixer->fix('<p>Nous avons "caché" une page Goodies sur <a href="http://jolicode.com/">Jolicode.com</a> !</p>'); | |
// Result: <p>Nous avons « caché » une page Goodies sur <a href="http://jolicode.com/">Jolicode.com</a> !</p> |
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
import serial | |
ser = serial.Serial('/dev/ttyUSB0', 9600) | |
while 1: | |
print ser.readline() |
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
#include <SPI.h> | |
#include <Ethernet.h> | |
// Thx http://bildr.org/2012/11/force-sensitive-resistor-arduino/ | |
// Make use of https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide | |
// MAC Address, needed by the Ethernet Shield | |
byte mac[] = { 0xB0, 0xC0, 0xDE, 0xEF, 0xFE, 0xC7 }; | |
int pin_red = 7; // Red LED |
NewerOlder