Skip to content

Instantly share code, notes, and snippets.

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

Mariano Martín Fresno mnofresno

🏠
Working from home
View GitHub Profile
@mnofresno
mnofresno / index.html
Created November 9, 2021 15:51
This Gist is able to handle the paste event on an HTML page using data coming from Excel or google drive
<html>
<body>
<div id='editableDiv' contenteditable='true'>
<form>
<table id="tabla">
<tr>
<th>Campo 1</th>
<th>Campo 2</th>
<th>Campo 3</th>
@mnofresno
mnofresno / README.md
Last active April 5, 2024 20:48
This script allows to do on Linux desktop PC some simple ocr tasks that we currently can do on Android using Google lens

Google Lens For Ubuntu

For those who use Google Lens on Android as an OCR to capture text from images, screenshots, etc.. here is a bash script that does the same on Ubuntu.

Sometimes we need to copy a telephone number in an APP where there isn't a copy to clipboard feature enabled or maybe to copy texts from an picture.

This can be done with a OCR, this script does that allowing to drag&drop select a region of the screen and copy to clipboard the text parsed from the image.

#!/bin/bash 
@mnofresno
mnofresno / index.html
Created September 11, 2021 19:24
Basic HTML multi-language example for a single page portfolio app with data-centric approach
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" cntent="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Sitio de Ema</title>
</head>
<body>
@mnofresno
mnofresno / .gitignore
Last active May 26, 2020 21:51
RocketChat linker bookmarklet
credentials.conf
@mnofresno
mnofresno / gekko_mariano_strategy_v1.js
Last active November 14, 2018 19:04
Gekko strategy for learning purposes with 10% quarterly profit
// Let's create our own strategy
var strat = {};
// Prepare everything our strat needs
strat.init = function() {
// your code!
this.count = 0;
var weight = 10;
@mnofresno
mnofresno / clasificador.py
Created July 14, 2018 05:08
Pequeño clasificador de ejemplo para aprender machine learning
from sklearn import tree
features = [[130, 6],[140, 9],[150, 90],[170, 777], [900,555]]
labels = [[0, 0], [0, 0], [1, 0], [1, 1], [2, 2]]
classifier = tree.DecisionTreeClassifier()
colorDictionary = {0: 'roja', 1:'verde', 2:'azul'}
typeDictionary = {0: 'naranja', 1: 'manzana', 2: 'pera'}
trainedClassifier = classifier.fit(features, labels)
prediction = trainedClassifier.predict([[100,9999]]);
print('Type Prediction: ', typeDictionary[prediction[0][0]], ' Color Prediction: ', colorDictionary[prediction[0][1]])
@mnofresno
mnofresno / server_status_report.php
Created June 2, 2018 14:17
Informe automático del estado de un servidor
function TotalDisco($disco)
{
}
function UsadoDisco($disco)
{
}
@mnofresno
mnofresno / .bash_profile
Last active December 19, 2017 12:45
This Gist is a bash Script that opens ssh-agent and help to avoid inserting private key every day works in Windows/Linux
# Config Vars
private_key_path=/c/Users/myUser/my_private.key
dev_files_path=/d/my/dev/directory
key_expiration_ttl=28800
# Compute config filename with current date
current_date=$(date +"%Y%m%d")
SSH_ENV="$TEMP/environment_$current_date"
# Set up ssh-agent
@mnofresno
mnofresno / RestEngine.gs
Last active November 17, 2017 14:15
REST logic script for google APPs Script
var DOC_ID = ""; // Add spreadsheet ID
var SHEET_NAME = "Sheet1"; // Add spreadsheet name
var setDocAndSheet = function(request)
{
if(request.parameters.docId !== undefined) DOC_ID = request.parameters.docId;
if(request.parameters.sheetName !== undefined) SHEET_NAME = request.parameters.sheetName;
};
var requestHasId = function(request)
@mnofresno
mnofresno / radios_nacionales.txt
Created October 7, 2017 13:12 — forked from pisculichi/radios_nacionales.txt
URLs de radios nacionales de Argentina, para poder escuchar en la terminal con mplayer o vlc
# alias radio='function __radio(){ r=`grep -v "#" radios_nacionales.txt | grep -m 1 -i $1 | cut -d" " -f1`; cvlc $r 2> /dev/null; }; __radio'
# podria utilizarse mplayer en vez de vlc
AMs Nacionales
http://200.68.81.65:8000/am530 Radio Madre 530
http://www.servidorstreaming1.com:9962/; Radio Colonia 550
http://195.154.182.222:25223/live.mp3 Radio Argentina 570
http://18683.live.streamtheworld.com/CONTINENTAL_SC Continental 590
http://38.107.243.197:9639/live Rivadavia 630