Skip to content

Instantly share code, notes, and snippets.

View gbhgit's full-sized avatar
🖥️
Working

Gabriel Holanda gbhgit

🖥️
Working
View GitHub Profile
@gbhgit
gbhgit / vpn_credentials.sh
Last active March 27, 2020 16:04
Automatic reconnects to the VPN server if lost connection
#!/usr/bin/expect
# + INSTALL:
# - install fortclient: sudo apt-get install <FortiClient installation deb file>
# - setup fortclient case x64: sudo /opt/forticlient-sslvpn/64bit/helper/setup
# - setup fortclient case x32: sudo /opt/forticlient-sslvpn/32bit/helper/setup
# - install: sudo apt-get install expect or sudo apt-get install ppp expect
# + USAGE:
# - Line 13: ADD IP AND PORT BY REPLACING 'IP:PORT', USE ':' BETWEEN IP AND PORT
# - Line 13: ADD VPN USER BY REPLACING 'USER'
@gbhgit
gbhgit / client-image-transfer.py
Last active April 25, 2020 13:59
Socket Client-Sever Images Transfer
import os
import cv2
import time
import base64
import socketio
import threading
from datetime import datetime
# all images .jpg in folder and subfolders of 'path_to_send_images' generates
# a connection to upload images via socket for corresponding path in client machine
@gbhgit
gbhgit / deleteVowels.py
Last active June 29, 2021 19:16
DeleteVowels in vector of strings
import datetime
string_1 = "nao passei no teste"
string_2 = "aeiou"
vector_str = [string_1, string_2]
# My solution
def rem_vowel_developed_Gabriel(vector_str):
vowels = ['a','e','i','o','u']
vector_str_2 = []