Skip to content

Instantly share code, notes, and snippets.

@garrettdieckmann
garrettdieckmann / ubuntu_install.sh
Created March 7, 2016 17:54
Install instructions for 'kaishengtai/neuralart' (no GUI)
# Installation instructions for kaishengtai/neuralart
# from: https://github.com/kaishengtai/neuralart
# Instructions for installation on Ubuntu 14+, without CUDA and without a GUI
# (ex. using DigitalOcean droplet with CPU mode)
# NOTE: CPU mode uses VGG and requires ALOT of memory (8-64GB depending on --size params)
# Install torch + dependencies
apt-get install libssl-dev
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
@garrettdieckmann
garrettdieckmann / Update PSPCMPROG.LASTUPDOPRID to PPLSOFT
Last active October 2, 2023 16:51
Update PSPCMPROG.LASTUPDOPRID back to 'PPLSOFT' for any object delivered within a specific Project
/* Update value of PSPCMPROG.LASTUPDOPRID to 'PPLSOFT' for all PeopleCode that was copied into the database */
/* within a specific project (&projectname). */
-- NOTE/UPDATE: Due to discrepencies in how the objectvalues are populated between the PSPROJECITEM and PSPCMPROG records, this SQL will NOT correctly update the PSPCMPROG record.
update sysadm.pspcmprog pcode set pcode.lastupdoprid = 'PPLSOFT' where pcode.rowid in
(select pc.rowid
from pspcmprog pc
, psprojectitem pi
where pc.objectid1 = pi.objectid1
and pc.objectvalue1 = pi.objectvalue1
@garrettdieckmann
garrettdieckmann / ProjectItem Objectypes
Last active October 2, 2023 16:50
Objects descriptions for Object types in the PeopleSoft Projectitem record
/* Source: http://docs.oracle.com/cd/E39332_01/psft/acrobat/pt853tapd-b0213.pdf */
/* Page 598. Contains Object types and descriptions for Tools 8.53 */
select projectname
, case when objecttype='0' then 'Records'
when objecttype='1' then 'Indexes'
when objecttype='2' then 'Fields'
when objecttype='3' then 'Format definitions'
when objecttype='4' then 'Translate values'
when objecttype='5' then 'Pages'
when objecttype='6' then 'Menus'
@garrettdieckmann
garrettdieckmann / Modified GET_PS_OPRID
Created February 25, 2014 23:05
PeopleSoft Audit Records
/* Title: GET_PS_OPRID */
/* Purpose: Retrieves the operator id (OPRID) */
/* from a VARCHAR2 comma separated field */
/* of the format 'OPRID,OS_USER,MACHINE' */
/* If no OPRID is found, it returns '!NoOPRID' */
/* Limitations: (any grants, privileges, etc) */
/* Who: PeopleSoft Inc. */
/* Date: 2000-04-07 */
Create or replace function SYSADM.GET_PS_OPRID (v_client_info VARCHAR2 )
return VARCHAR2 is
@garrettdieckmann
garrettdieckmann / CRON job
Last active November 8, 2021 03:16
RMAN Incremental backup via BASH Cron job
[oracle@database scripts]$ crontab -l
# Perform full backup on database Sunday at 3:05 am
5 3 * * 0 /$HOME/scripts/backup_db database_name full > /$HOME/scripts/logs/full_backup.log
# Perform incremental backups on database Mon-Sat at 3:05 am
5 3 * * 1-6 /$HOME/scripts/backup_db database_name inc > /$HOME/scripts/logs/inc_backup.log