Skip to content

Instantly share code, notes, and snippets.

View jvitorsf's full-sized avatar

João Vitor Sozinho Ferreira jvitorsf

View GitHub Profile
@jvitorsf
jvitorsf / AWS S3 Transfer Script
Created January 8, 2019 18:04
AWS Script to Upload File
#!/bin/bash
aws s3 cp /home/source/file.ext s3://s3bucketname/folder/$(date '+%Y%m%d%H%M%S')file.dat --acl private
# Create the following file named .bash_prompt
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
@jvitorsf
jvitorsf / slowloris.py
Created August 6, 2018 20:26 — forked from gkbrk/slowloris.py
Slowloris implementation in Python.
import socket
import random
import time
import sys
log_level = 2
def log(text, level=1):
if log_level >= level:
print(text)
@jvitorsf
jvitorsf / openofficeinstall.sh
Last active May 18, 2017 19:44
Open Office Install on Amazon Linux
#! /usr/bin/env bash
mkdir ~/openoffice
cd ~/openoffice
wget "https://downloads.sourceforge.net/project/openofficeorg.mirror/4.1.3/binaries/en-US/Apache_OpenOffice_4.1.3_Linux_x86-64_install-rpm_en-US.tar.gz?r=&ts=1495128477&use_mirror=ufpr"
mv "Apache_OpenOffice_4.1.3_Linux_x86-64_install-rpm_en-US.tar.gz?r=&ts=1495128477&use_mirror=ufpr" openoffice.tar.gz
tar -xvf openoffice.tar.gz
cd en-US
cd RPMS
sudo yum localinstall *.rpm --skip-broken -y
@jvitorsf
jvitorsf / azure_sas_auth.py
Created March 30, 2017 15:22
Azure SAS Authentication
# requests is a thirdpary package and needs to be downloaded separately.
# I used pip: https://pip.pypa.io/en/stable/installing/ to install the requests package
import requests
import hashlib
import base64