Skip to content

Instantly share code, notes, and snippets.

Ronivaldo Sampaio ronivaldo

Block or report user

Report or block ronivaldo

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
@ronivaldo
ronivaldo / duplicate_db.py
Created Nov 25, 2019
Backup Duplicate Files
View duplicate_db.py
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
@ronivaldo
ronivaldo / reboot_dlink_nas.py
Created Nov 11, 2019
Dlink NAS 320L Restart
View reboot_dlink_nas.py
View dependency_manager.py
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"
View selenium_test.py
"""
Paginas de Login para Testes:
http://testing-ground.scraping.pro/login
Mais paginas:
http://testing-ground.scraping.pro/
Exemplo simples:
https://selenium.dev/selenium/docs/api/py/
@ronivaldo
ronivaldo / hanna_moves.py
Created Nov 3, 2019
Hanna moves in a lattice
View hanna_moves.py
# Hanna moves in a lattice where every point can be represented by a pair of integers.
# She moves from point A to point B and then takes a turn 90 degrees rightand starts
# moving till she reaches the first point on the lattice. Find what's the
# point she would reach?
# A' . |
# . |
# . | . . . A
# . | .
# -------------------------
# |
@ronivaldo
ronivaldo / create_users.py
Created Oct 20, 2019
create_users_and_valid_tokens
View create_users.py
import requests
def criar_contas(numero):
cookies = {
}
headers = {
'Connection': 'keep-alive',
'Cache-Control': 'max-age=0',
@ronivaldo
ronivaldo / py
Last active Aug 26, 2018
phishing_breaker.py
View py
from __future__ import print_function
from random import randint
import requests
import string
import random
import time
import sys
import argparse
__author__ = 'Ronivaldo <ronivaldo@gmail.com>'
@ronivaldo
ronivaldo / gitflow-breakdown.md
Created Aug 20, 2018 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.
View gitflow-breakdown.md

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@ronivaldo
ronivaldo / rpi-led-notes.md
Created Apr 15, 2018 — forked from taktran/rpi-led-notes.md
Controlling Raspberry Pi 2 LEDs
View rpi-led-notes.md

Commands for controlling the Raspberry Pi 2 LEDs.

See rpi-leds for a node module that does this.

Power (PWR) LED

  • OK (ACT) LED = led0
  • Power (PWR) LED = led1

Allow access

View readscale.py
#!/usr/bin/python
#-*- coding: UTF-8 -*-
import os, time
import usb.core
import usb.util
import pygtk
pygtk.require('2.0')
import gtk
from sys import exit
You can’t perform that action at this time.