This file contains hidden or 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
http://stackoverflow.com/questions/27383686/how-could-i-have-made-this-ruby-kata-solution-into-a-recursive-method | |
https://laracasts.com/discuss/channels/general-discussion/house-of-cards-kata | |
http://cifrasyteclas.com/2012/12/07/cuantas-cartas-hacen-falta-para-construir-un-castillo-de-naipes-reto-77-propiedad-1/ | |
Description: | |
You want to build a standard house of cards, but you don't know how many cards you will need. Write a program which will count the minimal number of cards according to the number of floors you want to have. For example, if you want a one floor house, you will need 7 of them (two pairs of two cards on the base floor, one horizontal card and one pair to get the first floor). Here you can see which kind of house of cards I mean: http://www.wikihow.com/Build-a-Tower-of-Cards | |
Details (Ruby & JavaScript) |
This file contains hidden or 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 -s https://getcomposer.org/installer | php -- --quiet --install-dir=$OPENSHIFT_DATA_DIR | |
php $OPENSHIFT_DATA_DIR/composer.phar update | |
ln -s public php |
This file contains hidden or 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 | |
/* | |
PHP Library - Social Security Number-related functions | |
Copyright (c) 2009, reusablecode.blogspot.com; some rights reserved. | |
This work is licensed under the Creative Commons Attribution License. To view | |
a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or | |
send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California | |
94305, USA. |
This file contains hidden or 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
@extends('app') | |
@section('content') | |
<div class="container"> | |
Editar: <h1>{{$article->title }}</h1> | |
{!! Form::model($article, ['method' => 'PATCH', 'action' => ['HomeController@update', $article->id]]) !!} | |
@include('partials.form',['buttonSubmit'=>'Actualizar Articulo']) |
This file contains hidden or 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
@extends('app') | |
@section('content') | |
<div class="container"> | |
{!! Form::open(['action' => 'HomeController@store'])!!} | |
@include('partials.form',['buttonSubmit'=>'Actualizar Articulo']) | |
{!! Form::close() !!} | |
</div> |
This file contains hidden or 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
"dtisgodsson/twilio": "dev-master" | |
Update your Composer packages: | |
composer update | |
Next, add the Service Provider to our application config. Open up app/config/app.php and in the providers array, add the following line: | |
'Dtisgodsson\Twilio\TwilioServiceProvider', | |
Finally, publish the package configuration so we can add our own Twilio details. | |
php artisan config:publish dtisgodsson/twilio |
This file contains hidden or 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
<VirtualHost *:443> | |
ServerName sexylip.co | |
DocumentRoot /var/www/linc/public | |
<Directory /var/www/linc/public> | |
<IfModule mod_rewrite.c> | |
Options -MultiViews | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.php [L] | |
</IfModule> |
This file contains hidden or 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
El primer paso para definir nuestros entornos, es modificar el fichero bootstrap->start.php. | |
En mi caso, he definido dos entornos de desarrollo: uno local y otro remoto: | |
$env = $app->detectEnvironment(array( | |
'local' => array('*localhost*'), | |
'remoto'=> array('*azurewebsites.net'), | |
)); |
This file contains hidden or 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
//use Stripe\Stripe; | |
\Stripe\Stripe::setApiKey('SECRET API KEY'); | |
$token = Input::get('token'); | |
$amount = Input::get('amount'); | |
try { | |
$charge = \Stripe\Charge::create(array('card' => $token, 'amount' => $amount, 'currency' => 'usd')); | |
} catch (Error\Card $e) { | |
return Response::json(array( | |
'status' => 'failed', |
This file contains hidden or 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
Backend: | |
1) Alternativa | |
public function twilio($carpeta, $sonido){ | |
$twiml = new Services_Twilio_Twiml(); | |
// $twiml->say('hola', array('voice' => 'alice')); | |
$twiml->play('http://104.236.236.57/sounds/'.$carpeta.'/'.$sonido.'.mp3'); | |