Skip to content

Instantly share code, notes, and snippets.

@ronivaldo
ronivaldo / reboot_dlink_nas.py
Created November 11, 2019 01:05
Dlink NAS 320L Restart
@ronivaldo
ronivaldo / dependency_manager.py
Last active November 22, 2019 02:06
Flask-Migrate
import os
import platform
__author__ = "Ronivaldo Sampaio"
__copyright__ = "Kontus (www.kontus.com.br)"
__credits__ = ["Ronivaldo Sampaio"]
__version__ = "1.0.0"
__maintainer__ = "Ronivaldo Sampaio"
__email__ = "ronivaldo@gmail.com"
__status__ = "Production"
@ronivaldo
ronivaldo / duplicate_db.py
Created November 25, 2019 02:23
Backup Duplicate Files
from __future__ import print_function
# tutorial
# https://www.pythoncentral.io/introductory-tutorial-python-sqlalchemy/
# https://chartio.com/resources/tutorials/how-to-execute-raw-sql-in-sqlalchemy/
import os
import sys
from sqlalchemy import Column, ForeignKey, Integer, String, Numeric
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
var message = prompt("Enter the message");
var count = prompt("Enter the Number of times"); // Change the Number to change
var looper = 0;
for(looper=0;looper<count;looper++)
{
window.InputEvent = window.Event || window.InputEvent;
var d = new Date();
var event = new InputEvent('input', {bubbles: true});
var textbox= document.querySelector('#main > footer > div._2BU3P.tm2tP.copyable-area > div > span:nth-child(2) > div > div._2lMWa > div.p3_M1 > div > div._13NKt.copyable-text.selectable-text');
# Backup and Restore a Docker Volume
Reference:
https://github.com/loomchild/volume-backup
As the docker user guide explains, [data volumes](https://docs.docker.com/userguide/dockervolumes/#data-volumes) are meant to persist data outside of a container filesystem. This also ease the sharing of data between multiple containers.
A Metabase Docker compose file will be used as containers:
```yml
version: '3.8'
@ronivaldo
ronivaldo / rpmLargeFont.ino
Created May 15, 2013 21:02
A set of custom made large numbers for a 16x2 LCD HD44780 Arduino Library
/*
A set of custom made large numbers for a 16x2 LCD using the
LiquidCrystal librabry. Works with displays compatible with the
Hitachi HD44780 driver.
The Cuicuit:
LCD RS pin to D12
LCD Enable pin to D11
LCD D4 pin to D5
LCD D5 pin to D4