Skip to content

Instantly share code, notes, and snippets.

View gmarcos87's full-sized avatar

Marcos Gutierrez gmarcos87

View GitHub Profile
[
{"type":"config", "data": {}},
{"type":"key", "data": {"key": "aaa123", "valid": true, "sig": "" }},
{"type":"key", "data": {"key": "aaa123", "valid": false, "sig": "" }},
{"type":"key", "data": {"key": "ccc123", "valid": true, "sig": "RWToohndoCD7fyxT6k0ZZ6/IhSrrh121b6+eM5xHktbAWoCmEv13W5AsRbmDjek6tqV8rotn38qWyOCwnCXv0q1xEegRVRrNeQg="}},
{"type":"key", "data": {"key": "ddd456", "valid": true, "sig": "RWToohndoCD7fyxT6k0ZZ6/IhSrrh121b6+eM5xHktbAWoCmEv13W5AsRbmDjek6tqV8rotn38qWyOCwnCXv0q1xEegRVRrNeQg="}}
]
untrusted comment: public key d6504110aabe98fd
c0rK32OX7LtgpB9MsV9AMMicQWK495C3s15pbAaXfnE
#!/usr/bin/env lua
--[[
Copyright 2017 Marcos Gutierrez <gmarcos87@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-3.0
]]--
local json = require 'luci.json'
@gmarcos87
gmarcos87 / connectionHandler.js
Last active July 28, 2019 11:40
WIP - Webrtc in a mesh network
function createConnection(){
const connection = new RTCPeerConnection();
let myIces = [];
let channel;
createChannel()
/**
*
* @param {String} type
* @param {String} sdp
@gmarcos87
gmarcos87 / gsoc2018.md
Created August 11, 2018 14:43
Conclusion of GSoC 2018

GSoC Project abstract

Result

In these three months I was working on create a user interface for lime-hwd-ground-routing that is easy to use and understand. The main goal was to have a ground routing configuration page in Lime-app (simple GUI for Libremesh router management). This main  goal was achieved. Currently there are two pull-request modules that incorporate this functionality, both in the view (libremesh/lime-app#153) and in the ubus modules (libremesh/lime-packages-ui#20). In addition, the interface is translated into English and Spanish and incorporated into the wikitransalte scheme that uses libremesh.

Acknowledgments

I want to thank the Freifunk community, the LibreMesh team and especially Gio for his work as a mentor, he was always there to answer my questions and concerns. Finally, I would like to thank

@gmarcos87
gmarcos87 / i18n-diff.js
Created October 21, 2017 12:38
Identify missing and missing keys in different languages ​​by taking one as a reference
const genericFile = require('./locales/en.json')
const colors = require('colors')
// Load all translation in locales folder
let translations = {}
require('fs').readdirSync('./locales/').forEach((file) => {
if (file.match(/\.json$/) !== null) {
let name = file.replace('.json', '')
translations[name] = require('./locales/' + file)
@gmarcos87
gmarcos87 / gsoc2017.md
Last active September 1, 2017 10:40
Conclusion of GSoC 2017

GSoC Project abstract

Result

In these three months I was working on the implementation of Luci2 (the graphic interface of LEDE / OpenWrt). The project was to translate the functionalities that Libremesh currently uses in Luci to the new proposal. The new environment consists of a backend based on UBUS that exposes JSON with data and the structure of the view (see more). As far as Google Summer of Code goes, I was able to make the ubus modules that emit information about bmx6, batman-adv, alignment, spectrum analysis, libremap and finally a series of several utilities. The results can be found in the lime-packages-ui repository.

Documentation

Each module has its documentation on the calls and the expected answers.

@gmarcos87
gmarcos87 / index.html
Created April 19, 2017 19:10
Websocket messages by ID
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://unpkg.com/@reactivex/rxjs@5.0.3/dist/global/Rx.js"></script>
@gmarcos87
gmarcos87 / en.js
Last active April 10, 2017 00:40
patchwork v3 - English strings
module.exports = {
public : "Public",
private : "Private",
mentions : "Mentions",
profile: "Profile",
hasBeenReleased : "has been released.",
clickInfo : "Click here for more info!",
copyLink : "Copy Link Ref ",
inspectProcess : "Inspect Server Process",
copyMessageId : "Copy Message ID",
@gmarcos87
gmarcos87 / boletin.sh
Last active September 29, 2016 13:44
Script en bash para descargar y buscar en los Boletines oficiales de la provincia de Córdoba, Argentina. Es necesario hacerlo ejecutable con "chmod a+rwx boletin.sh" y se puede pasar el parámetro de fecha "./boletin.sh DDMMYYYY". Si no se envia el atributo de fecha toma la del momento de la ejecución.
#! /bin/bash
declare -a URLS
if [[ -n "$1" ]]; then
fecha=$1
else
fecha=`date +%d%m%Y`
fi
day=${fecha:0:2}