Skip to content

Instantly share code, notes, and snippets.

View ethanpost's full-sized avatar
💭
Freelancing, building SAAS apps, and creating tools.

Ethan Post ethanpost

💭
Freelancing, building SAAS apps, and creating tools.
View GitHub Profile
GO PLSQL Package Documentation
=====
[TOC]
#**PROCEDURES AND FUNCTIONS**
#**PACKAGES**
##**GO**
@ethanpost
ethanpost / gist:1845ff526bdd6ca3dbc81fd8f97dd71b
Created August 8, 2018 00:57
Bash function returns files only from a directory. Can return full path. Does not return files in sub-directories. Uses find so it can handle a large number of files.
function file_list_files {
# Return the full path to the files in a directory. Does not include subdirectories.
# >>> file_list_files [-l] "directory"
# -l: Return full path (long listing).
typeset directory full_path file
if [[ "${1}" == "-l" ]]; then
shift && full_path=1
else
full_path=0
fi
@ethanpost
ethanpost / gist:c2a622c9aad1017e9eab766b278a2b3f
Created August 8, 2018 15:10
My implementation of a 'file_is_binary' function.
# Some lines may be dependent on my framework and need to be removed or modified. Easy enough to do.
function file_is_binary {
# Return true if file is binary, false if not.
# >>> file_is_binary "file"
${arcRequireBoundVariables}
typeset file
file="${1:-}"
file_raise_file_not_found "${file}" && ${returnTrue}
[[ ! -s "${file}" ]] && ${returnFalse}
if boot_does_program_exist "perl"; then
create or replace view whatslocked as (
select session_id,
oracle_username
, object_name
, decode(a.locked_mode,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
@ethanpost
ethanpost / Ethan_Ray_Post_2019_Accomplishments.md
Last active January 17, 2019 16:59
A brief list of things I have accomplished in 2019.

Ethan Ray Post (2019 Accomplishments)

You can find my resume here.

Contact me at 931-230-3318 or post.ethan@gmail.com. Text or email first (phone bot avoidance strategy).

January

Free Stuff
Released an .awk script that generates charts from the command line using Google Charts.

@ethanpost
ethanpost / resume.md
Last active July 8, 2019 22:15
Resume for Ethan Ray Post

Ethan Ray Post

Sr. Systems Admin/Automation Specialist

3514 Kennedy Ln. Centerville, TN 37033 (931) 230-3317

  • 20 years of experience working with technologies new and old in multiple roles.
@ethanpost
ethanpost / mail.py
Created January 1, 2020 05:16
Example of using Flask-Mail with Gmail
# This code works for me :)
from flask import Flask
from flask_mail import Mail, Message
app = Flask(__name__)
app.config.update(dict(
DEBUG=True,
MAIL_SERVER='smtp.gmail.com',
begin
dbms_network_acl_admin.create_acl (
acl => 'http_access', -- or any other name
description => 'HTTP Access',
principal => 'ADMIN', -- the user name trying to access the network resource
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null
);