This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| aws s3 cp /home/source/file.ext s3://s3bucketname/folder/$(date '+%Y%m%d%H%M%S')file.dat --acl private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import socket | |
| import random | |
| import time | |
| import sys | |
| log_level = 2 | |
| def log(text, level=1): | |
| if log_level >= level: | |
| print(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |