This file contains 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 | |
class PwdImg{ | |
private $password; | |
private $chars = "abcdefghijklmnopqrstuvwxyz0123456789"; | |
private $long; | |
public function __construct($pwd){ | |
$this->long = strlen($this->chars); |
This file contains 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
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' }, |
This file contains 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
app: | |
build: ./nginx | |
restart: always | |
volumes: | |
- ./angular:/var/www/html/angular | |
ports: | |
- "80:80" | |
- "443:443" |
This file contains 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
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 \ |
This file contains 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
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" |
This file contains 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
deny 5.228.100.253; | |
deny 176.77.9.144; | |
deny 94.180.134.52; | |
deny 95.24.146.125; |
This file contains 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
#!/bin/sh | |
# | |
# Git.sh | |
# | |
# Uso: ./git.sh | |
# | |
# Original: http://sekika.github.io/2016/06/06/github-many-files/ | |
# | |
# Sin acentos* |
This file contains 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
const express = require('express'), | |
bodyParser = require('body-parser'), | |
jwt = require('jsonwebtoken'), | |
app = express(); | |
const config = { | |
llave : "miclaveultrasecreta123*" | |
}; | |
// 1 |
This file contains 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
worker_processes 4; | |
events | |
{ | |
worker_connections 1024; | |
} | |
http | |
{ |
This file contains 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
/** | |
* This code is stored to save my exam to Wizeline that I took for fun, sorry Wizeline if someone finds this... | |
* Technically it could be pretty simple, a "join" of the array, then parse to int, then sum 1, then split again the numbers | |
* and parse each to integer, and that's it, but the rules are: | |
* the numbers are going to be between 1 and 9, no trailing zero...like: [1,2,3,4,5,6,7,8,9] in the array but... | |
* the array size can be up to 10,000 (10e4 -> 10 * 10 * 10 * 10) so we can have a digits.length of 10,000 which means, we can have | |
* a loooooooooooooot of numbers that are going to "sum" a really big number, if we use parseInt then, after the "join" we are going | |
* to end with a "32131e1221" which is something that we don't want to... | |
* and the "+1" rule so for example: [9,9,9] is converted to 999 + 1 = 1000 and we need to return [1,0,0,0] | |
* |
OlderNewer