Skip to content

Instantly share code, notes, and snippets.

View PabloVallejo's full-sized avatar

Pablo Vallejo PabloVallejo

View GitHub Profile
@PabloVallejo
PabloVallejo / additional-images.php
Created February 12, 2014 16:45
additional images
<?php
// Additional images
// Note: after line 107 of 'controllers/bookmarklet.php'
if ( $req->additional_images )
Post_Meta::update( $id, ADDITIONAL_IMAGES, $req->additional_images );
@PabloVallejo
PabloVallejo / email.php
Created February 5, 2014 20:00
Email_Model::get_notification_body
<?php
/**
* Return the body of a notification
*
* @param { str } notification slug
* @param { arr } arguments to pass to the notification
* @return { str || bool } email body, or false on error
*/
function get_notification_body( $slug = null, $args = array() ) {
<?php
/**
*
* Mustache model
*/
/**
* Mustache model class
@PabloVallejo
PabloVallejo / Post_Model.thumb.php
Created February 5, 2014 13:32
Post_Model::thumb
<?php
/**
* Get the post thumbnail src
*
* <code>
*
* // Print post thumbnail
* <img src="<?php echo Post_Model::thumb(); ?>" />
@PabloVallejo
PabloVallejo / List_Model_Helper::thumb
Created February 4, 2014 17:10
List_Model_Helper::thumb
<?php
/**
* TODO: Write example
*/
public static function thumb( $list_id, $size ) {
$post_id = Arr::head( List_Model::make( $list_id )->get_items() );
bind: function( fn, context ) {
return function() {
return fn.apply( context, arguments );
}
}
  • Herramientas
  • Editor de texto
  • Git
  • Frameworks
  • Bootstrap
  • Resets
  • jQuery
  • CSS
  • CSS 3
  • Reset

Topics

Objetivo de las charlas

Entendiendo la arquitectura MVC * Models * Views

<?php
/**
* Function that will handle post insertion with data from
* POST request.
*
* <code>
*
* // Sample returned response
* ( object ) array( 'status'=> 200, 'post_id' => 10 );
@PabloVallejo
PabloVallejo / get_first_greather_int_index.php
Created August 29, 2013 17:45
get_first_greather_int_index
<?php
/**
* Return the key of the first elements
* greater than the one passed.
*
* <code>
*
* // Get the index of the first number greater than 15.
* // returns "1"