Skip to content

Instantly share code, notes, and snippets.

@bonanAngeLOL
bonanAngeLOL / StartIlo.sh
Created November 15, 2022 16:18
Headless VBox consumption
# StartIlo.sh
# By bonAngeLOL
# Start and/or connect to VBox VM on Win.
# This script must be executed from Git Bash or WSL
# I made this script because WSL had some performance and compatibility issues so I prefered to use a VM
# it can be executed to start and or connect to a VM and launch a shell in Windows Terminal using the next configuration:
# ...
# "profiles":
# {
# "list":
"Compile and run a C++ file being edited in splited section
" By BonAngeLOL
" I just wrote it some minutes ago, it should (must!) be improved.
" It also could be use to execute another language code
"
" What it does?
"
" It consists of two remaps when a file is .cpp (c++)
"
"
@bonanAngeLOL
bonanAngeLOL / e-consultaSitemapfilter.php
Created May 6, 2019 17:11
PHP parser for xml sitemap, just for getting an URL list filtered by specific date and text in URL
<?php
$file = file_get_contents('http://www.e-consulta.com/sitemap/notes/0');
$date = date_create(date('Y-m-d'))->modify('-1 days')->format('Y-m-d');
$xml = new SimpleXMLElement($file);
//echo 'komenco'.PHP_EOL.''.PHP_EOL;
echo 'fecha : '.date_create(date('Y-m-d'))->modify('-1 days')->format('d-m-Y').PHP_EOL.PHP_EOL;
@bonanAngeLOL
bonanAngeLOL / e-consultaSitemapfilter.js
Created May 6, 2019 17:07
JS parser for xml sitemap, just for getting an URL list filtered by specific date and text in URL
var x = Array.from(document.querySelectorAll("loc")).map(x=>x.innerHTML);
y = x.filter(a=>/2019-05-01/.test(a));
z = y.filter(a=>/^((?!(deportes|espectaculos|opinion)).)*$/.test(a));