Skip to content

Instantly share code, notes, and snippets.

View Akeri's full-sized avatar
🙃
Working at ALIA Technologies

Juan Costa Akeri

🙃
Working at ALIA Technologies
View GitHub Profile
@Akeri
Akeri / binder.class.js
Created June 1, 2020 16:41
Simple jQuery template/data render
/**
* Class for single data binding management. Converts Markdown data into HTML data.
*
* @author Brais Saco Estévez
* @requires showdown
* @url https://github.com/showdownjs/showdown
*
* @lint global Binder
*/
window.Binder = class Binder {
@Akeri
Akeri / file-icon.filter.js
Created March 28, 2020 16:20
AngularJS Filter to transform MIME type to FontAwesome 4 icon class
angular.module('ngapp')
/**
* Transform MIME type to FontAwesome 4 icon class
*/
.filter('mime2fa', function () {
const iconClasses = {
// Media
'image': 'fa-file-image-o',
@Akeri
Akeri / find-gpx
Last active March 8, 2020 17:25
Search along all Runtastic exported gpx by a date
const glob = require('glob');
const gpxParse = require('/usr/local/lib/node_modules/gpx-parse');
const moment = require('moment');
const exportDir = '';
const path = `${exportDir}/Sport-sessions/GPS-data/*.gpx`;
glob.sync(path).forEach((file) => {
gpxParse.parseGpxFromFile(file, (error, result) => {
const time = result.tracks[0].segments[0][0].time;