Skip to content

Instantly share code, notes, and snippets.

View asfo's full-sized avatar
Verified profile

Asfo Zavala asfo

Verified profile
View GitHub Profile
@asfo
asfo / search.pipe.ts
Created January 31, 2018 17:10
Filtro de búsqueda para Angular 4/5
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'search'
})
export class SearchPipe implements PipeTransform {
public defaultDiacriticsRemovalMap: any = [
{ 'base': 'A', 'letters': '\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F' },
{ 'base': 'AA', 'letters': '\uA732' },
@asfo
asfo / pwd.php
Last active November 9, 2015 01:31
<?php
class PwdImg{
private $password;
private $chars = "abcdefghijklmnopqrstuvwxyz0123456789";
private $long;
public function __construct($pwd){
$this->long = strlen($this->chars);