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 / 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);
@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 / docker-compose.yml
Created March 7, 2018 03:37
Docker Compose para Angular + Nginx
app:
build: ./nginx
restart: always
volumes:
- ./angular:/var/www/html/angular
ports:
- "80:80"
- "443:443"
@asfo
asfo / Dockerfile
Created March 7, 2018 03:43
Dockerfile para Nginx
FROM ubuntu
MAINTAINER Asfo "asfoone@gmail.com"
ENV NGINX_VERSION 1.13.4
RUN apt-get update && apt-get install -y ca-certificates build-essential wget libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev
RUN wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz \
&& tar -xvzf openssl-1.0.2d.tar.gz \
@asfo
asfo / conf
Created March 7, 2018 03:50
Conf OpenSSL Nginx
if [ $OPENSSL != NONE ]; then
case "$CC" in
cl | bcc32)
have=NGX_OPENSSL . auto/have
have=NGX_SSL . auto/have
CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
@asfo
asfo / nginx.conf
Created March 7, 2018 03:55
Configuración de Nginx para Angular
worker_processes 4;
events
{
worker_connections 1024;
}
http
{
@asfo
asfo / blockips.conf
Created March 7, 2018 04:09
Bloqueador de IPs para Nginx
deny 5.228.100.253;
deny 176.77.9.144;
deny 94.180.134.52;
deny 95.24.146.125;
@asfo
asfo / git.sh
Created June 6, 2018 15:38
Git.sh para subir archivos a Git de forma automática.
#!/bin/sh
#
# Git.sh
#
# Uso: ./git.sh
#
# Original: http://sekika.github.io/2016/06/06/github-many-files/
#
# Sin acentos*
@asfo
asfo / index.js
Created August 19, 2019 21:15
index.js para el tutorial de Medium acerca de la seguridad de APIs con JWT
const express = require('express'),
bodyParser = require('body-parser'),
jwt = require('jsonwebtoken'),
app = express();
const config = {
llave : "miclaveultrasecreta123*"
};
// 1
@asfo
asfo / fake_players.md
Last active April 13, 2023 01:57
Fake players for AzerothCore

How to use it:

Warning:It works only for AzerothCore and doesn't works on the last commit since it have some issues and the worldserver crashes, so that's why I'm not updating it to the latest version of AC, once that bug got fixed, I will update it.

  • Go to the root directory where you clone the repo, create a "patches" directory.
  • Create a file called fake_players.patch
  • Add the code above
  • Go back to the root directory
  • Run the command: