Skip to content

Instantly share code, notes, and snippets.

Snippet to generate an encoded password for Silex/Symfony usage

$username = "admin";
$password = "pass1234";

$factory = $app['security.encoder_factory'];
$user = new \Symfony\Component\Security\Core\User\User($username, $password);
$encoder = $factory->getEncoder($user);
$encodedPassword = $encoder->encodePassword($password, $user->getSalt());
@tixastronauta
tixastronauta / hyperion.config.json
Last active May 23, 2016 23:37
My hyperion configuration for lightberry hd (with video grabber)
{
"framegrabber":{
"width":64,
"frequency_Hz":10.0,
"height":64
},
"leds":[
{
"vscan":{
"minimum":0.91669999999999996,
@tixastronauta
tixastronauta / php_jsonp.php
Created November 16, 2015 18:19
PHP Handling JSONP requests
<?php
$response = array(
array(
'title' => "My article 1",
'content' => 'Lorem lorem'
),
array(
'title' => "My article 2",
'content' => 'Lorem lorem'
)
@tixastronauta
tixastronauta / facebook_leads.md
Last active August 28, 2024 15:28
Receiving Facebook Leads on a Webhook