Skip to content

Instantly share code, notes, and snippets.

View erajuan's full-sized avatar

Juan Eracleo Huamani Mendoza erajuan

View GitHub Profile
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"fade_fold_buttons": false,
"font_size": 11,
"gutter": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
],
@erajuan
erajuan / renew_cert.sh
Created October 9, 2017 21:39
Update Lets encription - ACME TINY
#!/usr/bin/sh
# renew cert
python /ssl/acme_tiny.py --account-key /ssl/account.key --csr /ssl/domain.csr --acme-dir /var/www/challenges/ > /ssl/signed.crt
# update chained.pem
cat /ssl/signed.crt /ssl/intermediate.pem > /ssl/chained.pem
# update dovecot keys
cp /ssl/chained.pem /etc/dovecot/dovecot.pem
cp /ssl/domain.key /etc/dovecot/private/dovecot.pem
# reload services
service nginx reload
@erajuan
erajuan / .htaccess
Created April 11, 2018 16:38 — forked from leocaseiro/.htaccess
Angular html5Mode apache working in a subdirectory /app using ngRoute
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*) /app/index.html [NC,L]
</IfModule>
@erajuan
erajuan / angular-apache2.4.conf
Created April 13, 2018 01:24
apache2 config: deploy angular 5 in a sub directory
Alias /app /path/to/angular/build/dir
<Directory /path/to/angular/build/dir >
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /a/index.html [L]
AllowOverride All
# Order allow,deny
@erajuan
erajuan / apis_net_pe.py
Last active September 25, 2024 18:38
Consulta de api ruc sunat, api dni reniec y tipo de cambio sunat
from typing import List, Optional
import logging
import requests
class ApisNetPe:
BASE_URL = "https://api.apis.net.pe"