Skip to content

Instantly share code, notes, and snippets.

View iicc1's full-sized avatar
🦾

Ignacio Iglesias iicc1

🦾
View GitHub Profile
@iicc1
iicc1 / automations.js
Last active June 6, 2022 12:01
Stakely Dirk/Vouch/Ethdo automation tool: create multiple deposit data from just one command
const { argv } = require('process')
const { promisify } = require('util')
const exec = promisify(require('child_process').exec)
const fs = require('fs')
const helpCommandText = `
Stakely Dirk/Vouch/Ethdo automation tool
Usage:
node automations.js [command]
@iicc1
iicc1 / agoric_node_monitor.sh
Last active March 28, 2021 22:39
Agoric node monitoring tool, developed by the Stakely.io team. This script periodically checks the most important node health status parameters (response, syncing, peers, and jailing). If abnormalities are detected, alerts will be sent to Telegram. The setup instructions are available inside the script.
#!/bin/bash
##############################################
#### Agoric node monitoring tool ####
#### Developed by the Stakely.io team ####
##############################################
### Instructions ###
@iicc1
iicc1 / LTO_Network_node_monitor.sh
Last active February 10, 2022 23:23
LTO Network node monitoring tool, developed by the Stakely.io team. It checks node health and sends alerts to Telegram
#!/bin/bash
##############################################
#### LTO Network node monitoring tool ####
#### Developed by the Stakely.io team ####
##############################################
### Instructions ###
@iicc1
iicc1 / mySolution
Last active April 11, 2023 20:21
SOLUTION: Error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory - Puppeteer - Node.js -Ubuntu
-> If you are experiencing the error: Error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
After installing Puppeteer for Node.js on Ubuntu with npm install -S puppeteer
-> This is how I solved it:
apt install libnss3-dev libxss1
-> And remember to set the no-sandbox option, like this:
const browser = await puppeteer.launch({headless: true, args: ['--no-sandbox']});

Keybase proof

I hereby claim:

  • I am iicc1 on github.
  • I am iicc (https://keybase.io/iicc) on keybase.
  • I have a public key ASCGILUM1d_6qWNEf3ODi99idA7K9Q_BcGwztcj6t3x6tAo

To claim this, I am signing this object:

@iicc1
iicc1 / LTONetworkStakingCompoundingComparison.m
Created September 7, 2019 15:43
Matlab Script created to evaluate LTO Network staking techniques graphically
close all;
clc;
initial_amount = 50000;
apr = 0.07;
divisions = 24;
n = [1:1:divisions];
divisions_apr = apr / divisions;
end_amount_nostake = initial_amount;
@iicc1
iicc1 / CompoundInterestLeaseLTO.m
Last active January 12, 2020 11:18
LTO leasing compound interest maximizer
function [v] = CompoundInterestLeaseLTO(withdrawal_fee, lease_fee, amount_leasing, roi)
% v vertical vector containing the reinvest values
% withdrawal_fee value in LTO
% lease_fee value in LTO
% amount_leasing value in LTO
% roi value in decimal
close all;
@iicc1
iicc1 / reconstruct.lua
Last active November 4, 2022 09:44
Reconstruct a Telegram message with entities (urls, bold, italic, code)
-- Download this UTF8 library for using this in Lua < 5.3 https://mods.curse.com/addons/wow/utf8
-- We need to manipulate this strings in utf8 because this is the way entities are given by Telegram
-- utf8 = require("utf8")
function process_text(text, entities) -- Use this as a function in your code, it will return the processed text.
if entities then
local teurl_url, teurl_word, tebold, teitalic, tecode = {}, {}, {}, {}, {} -- Create a table to store the substrings to substitute in the next loops without altering the offsets.
for i=1, #entities do
if entities[i].ID == "MessageEntityTextUrl" then
local url, len, off = entities[i].url_, entities[i].length_, entities[i].offset_
local eurl = string.utf8sub(text, off -3, off + len -3) -- Note that the offsets are always refering to the text without modifications, that is why I use original textext.
@iicc1
iicc1 / gist:991706a5fef0174014e1
Created December 28, 2015 23:11
Meizu LK Bootloader decompiled
This file has been truncated, but you can view the full file.
ROM:00000000 ; Segment type: Pure code
ROM:00000000 AREA ROM, CODE, READWRITE, ALIGN=0
ROM:00000000 CODE32
ROM:00000000
ROM:00000000 loc_0 ; CODE XREF: sub_34F4+3Cp
ROM:00000000 ; sub_51F4+14p ...
ROM:00000000 STMPLIA R8, {R3,R7,R9,R10,R12}
ROM:00000004 STREQD R8, [R3],-R0 ; DATA XREF: sub_6AD8+2Cr
ROM:00000004 ; sub_6B24+2Cr