Skip to content

Instantly share code, notes, and snippets.

jasp402 jasp402

Block or report user

Report or block jasp402

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jasp402 / ScrapingTable2()
Last active Mar 19, 2019
JavaScript - Get content Table and merge with head
View ScrapingTable2()
let headTable = c.TABLE_HEAD;
let table = $$(c.TABLE)
.map(x=>x.indexOf('View EOB')===-1
? x.replace(c.REGEX_TAGS,'')
: x.match(c.REGEX_ONCLICK)
let result =, idx)=> {
let obj = {id: idx+1};,i)=>obj[headTable[i]] = el[i]);
jasp402 / ScrapingTableToObject()
Created Mar 14, 2019
JavaScript - Get text of table to convert in Object
View ScrapingTableToObject()
var tblhdr = $('#folder_list_218 th').map(function () {
return $(this).text();
var tbl = $('#folder_list_218 tbody tr').map(function(idx, el) {
var td = $(el).find('td');
var obj = {id: idx+1};
jasp402 / ScrapingTable()
Last active Mar 14, 2019
JavaScript - Get Content Table
View ScrapingTable()
$('#ClaimPaymentGrid table tbody tr')
.map(x=>x.indexOf('View EOB')==-1
? x.replace(/<(.|\n)*?>/g,'')
: x.match(/(onclick=\").*?\"/g)
jasp402 / csvToJson()
Created Feb 5, 2019
Convert CSV to JSON with JavaScript and NodeJs
View csvToJson()
//Read file CSV
let csvfile = fs.readFileSync(__dirname + '/data/inputFile/example.csv', 'utf8');
//Function Convert CSV to JSON
const csvToJson = csv => {
const [firstLine, ...lines] = csv.split('\r\n');
return => firstLine.split(',').reduce((curr, next, index) => ({
[next]: line.split(',')[index],
}), {}));
jasp402 / MovieFile()
Last active Mar 5, 2019
AutoIt: Move files source and destination with complete path
View MovieFile()
#include <File.au3>
#include <Array.au3>
#include <WinAPIFiles.au3>
#include <FileConstants.au3>
HotKeySet("{ESC}", "Terminate")
;~ ---------------------------------
Global $listFile = "Y:\FileNameTif.txt" ;TIFF y TIFF
Global $orig = "Y:\TIF\" ; SOLO TIF
jasp402 / SearchCopy()
Last active Mar 5, 2019
AutoIt: Search recursively for files and copy
View SearchCopy()
#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
jasp402 / CRUD - List Name function
Last active Nov 26, 2018
Lista de nombre de funciones
View CRUD - List Name function
public $_database;
insert($data, $skip_validation = FALSE)
insert_many($data, $skip_validation = FALSE)
update($primary_value, $data, $skip_validation = FALSE)
jasp402 / JavaScript - pilot string
Created Aug 14, 2018
Extraer texto que esta asi "(text) (otherText)"
View JavaScript - pilot string
let visitType = row[8].split(/[(!.*^)]/g).filter(x=>{if(x && x.trim() != '')return x});
let visitTypeResult = visitType[1];
if(visitType[0] == 'TMIBI'){
visitTypeResult = visitType[0];
console.log('visitType: '+visitType);
let type = $$('#FILTER_APPT_TYPE option')
if((x.getText().search(visitType[0])) == 0){
View JavaScript - decryptCredentials | Detailed explanation
function decryptCredentials(str) {
//1.- la cadena originalmente codificada
//2.- uso de atob[] que es inverso de btoa[]
//3.- Se crea un Array con todos los valores
//4.- Se hace uso de map[] para procesar cada valor de array idividualmente
//5.- Se Completa cada valor del array con %00
View JavaScript - full year , month and Last month
let month = ('0' + (new Date().getMonth() + 1)).slice(-2);
let year = new Date().getFullYear();
let lastMonth = (month - 1) + '/01/' + year;
You can’t perform that action at this time.