Skip to content

Instantly share code, notes, and snippets.

View evelaguti's full-sized avatar
🏠
Working from home

Edgardo Alonso Velásquez Gutiérrez evelaguti

🏠
Working from home
  • Valparaíso
View GitHub Profile
@evelaguti
evelaguti / answerfile
Last active April 6, 2023 05:54 — forked from oofnikj/answerfile
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@evelaguti
evelaguti / extract-gbooks-terms.py
Created March 6, 2021 05:41 — forked from zapalote/extract-gbooks-terms.py
Example of multi-threading and memory mapped file processing.
# extraction pattern: ngram TAB year TAB match_count TAB volume_count NEWLINE
# out: unique_ngram TAB sum(match_count) NEWLINE
import re
import os, sys, mmap
from pathlib import Path
from tqdm import tqdm
from concurrent.futures import ThreadPoolExecutor
abv = re.compile(r'^(([A-Z]\.){1,})(_|[^\w])') # A.B.C.
@evelaguti
evelaguti / shell.ipynb
Created February 5, 2021 03:05 — forked from nikhilkumarsingh/shell.ipynb
Running shell commands using Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@evelaguti
evelaguti / Emailattachmentreceiver
Last active October 6, 2020 02:00 — forked from RK9260/Emailattachmentreceiver
Java code to read email and download attachments
import java.io.File;
import java.io.IOException;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.NoSuchProviderException;
@evelaguti
evelaguti / corsproxy.php
Last active August 6, 2020 16:49 — forked from dropmeaword/corsproxy.php
simple CORS proxy in php
<?php
// able the file to accept requests from *
header('Access-Control-Allow-Origin: *');
error_reporting( error_reporting() & ~E_NOTICE ); // evil
// config
$enable_jsonp = false;
$enable_native = false;
$valid_url_regex = '/.*/';
@evelaguti
evelaguti / regex_celulares_chile
Created July 5, 2020 23:45 — forked from jaimeguaman/regex_celulares_chile
regex validacion celulares chile
/^(\+?56)?(\s?)(0?9)(\s?)[9876543]\d{7}$/
@evelaguti
evelaguti / keybindings.json
Last active June 16, 2020 01:28
Si bien hay muchos alternadores modales y accesos directos de navegación para VS Code, no hay uno específicamente para "pasar del editor al terminal y viceversa". Abra keybindings.json desde el editor: CMD-SHIFT-P -> Preferencias: Abra el archivo de atajos de teclado y agregue estas entradas:
// Toggle between terminal and editor focus
{ "key": "ctrl+`", "command": "workbench.action.terminal.focus"},
{ "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"}
@evelaguti
evelaguti / heart.md
Last active May 11, 2023 07:55
Aparecen corazones de colores aleatorios, cuando haces click

Aparecen corazones de colores aleatorios, cuando haces click

!(function(e, t, a) {
  function n() {
    c(
      ".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"
    ),
      o(),
      r();
  }
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14