Skip to content

Instantly share code, notes, and snippets.

View developcreativo's full-sized avatar

Kelly Salazar developcreativo

View GitHub Profile
@developcreativo
developcreativo / stringmethods.py
Created October 24, 2015 01:14 — forked from playpauseandstop/stringmethods.py
Make possible to use all Python string methods as Django template filters
"""
=============
stringmethods
=============
Make possible to use all Python string methods as Django template filters. Also
provide custom template tag ``{% stringmethod %}`` to use methods with more
than one argument, like ``format``, ``count`` and other.
Restrictions
@developcreativo
developcreativo / dyntemplates.js
Created May 3, 2016 15:38 — forked from albertein/dyntemplates.js
Cargar templates dinamicamente en angular.js
var app = angular.module('yourApp', []);
// No olvide inyectar el servicio $compile a su controlador
app.controller('yourCtrl', ['$scope', '$compile', function($scope, $compile) {
//Trae el template crudo del servidor
var template = "<div ng-repeat='item in items'>{{item.name}}</div>";
//Por simplicidad del ejemplo vamos a insertar el template con jquery
$('#sucontainer').html(template);
//Hasta este momento lo que inserto en el DOM es inerte,
//Angular no conoce de su existencia.
//Para lograrlo tenemos que compilar el template y
@developcreativo
developcreativo / UuidModel.php
Created October 15, 2016 10:47 — forked from danb-humaan/UuidModel.php
Trait for implementing UUIDs in Laravel models
<?php
namespace App\Traits;
use Rhumsaa\Uuid\Uuid;
use Illuminate\Database\Eloquent\ModelNotFoundException;
/**
* Trait UuidModel
* @package App\Traits