Skip to content

Instantly share code, notes, and snippets.

@iversond
iversond / refresh.sql
Created September 12, 2023 19:26
Useful PeopleSoft Refresh SQL Statements - not a full list, but common and unique statements that have helped me improve the refresh process.
-- -----------
-- System Name
-- -----------
-- Persist the GUID across refreshes - used by the EMF Hub
UPDATE sysadm.psoptions
SET
guid = '<static guid>',
shortname = '<DBNAME>',
longname = '<Application> <Environment>',
systemtype = '<XLAT Types>',
@iversond
iversond / renameIBnodes.sql
Last active April 24, 2024 15:00
Rename IB nodes from production. Examples show both HR Production and Finance Production nodes renamed.
-- -------------------------
-- Rename Default Local Node
-- -------------------------
-- Rename IB Nodes
UPDATE sysadm.psmsgnodedefn
SET
msgnodename = 'HNONPROD',
authoptn = 'P',
@iversond
iversond / refreshtables.sql
Created September 12, 2023 16:02
PS Refresh Tables - rough list
-- System Base Tables
ps.psdbowner
sysadm.psstatus
sysadm.psstatus
sysadm.psoprdefn
sysadm.psaccessprfl
sysadm.psaccessprofile
sysadm.psoptions
-- Branding

PYTHON VIRTUAL ENV

Here’s what you need to know:

  • pyenv manages multiple versions of Python itself.
  • virtualenv/venv manages virtual environments for a specific Python version.
  • pyenv-virtualenv manages virtual environments for across varying versions of Python.
@iversond
iversond / fixdpkbug.pp
Last active July 9, 2021 17:15
Fix a DPK bug that prevents non-ACM app engines from running. This manifest expects the puppetlabs-powershell modules to be installed.
$dpk_location = hiera('dpk_location')
case $::osfamily {
'windows': {
exec { 'fix-dpk-bug':
command => "(gc ${dpk_location}/puppet/production/modules/pt_config/lib/puppet/provider/psae.rb) | %{ \$_ -replace \"ae_program_name=`\"PTEM_CONFIG`\"\", \"ae_program_name=resource[:program_id]\" } | set-content ${dpk_location}/puppet/production/modules/pt_config/lib/puppet/provider/psae.rb",
provider => powershell,
}
}
'RedHat', 'linux': {
@iversond
iversond / loadcache.pp
Last active November 21, 2021 00:55
This manifest can be used to run the LOADCACHE job on a fresh PeopleSoft Image. In your `psft_customizations.yaml` file, add `Cache Settings/ServerCacheMode: 1` to the app server `config_settings` section. This manifest expects the puppetlabs-powershell modules to be installed.
$ps_home_dir = hiera('ps_home_location')
$oracle_home_location = hiera('oracle_server_location')
$tns_dir = hiera('tns_dir')
case $::osfamily {
'windows': {
$gem_home = 'c:/program files/puppet labs/puppet/bin'
exec { 'install-psadmin_plus':
command => "${gem_home}/gem install psadmin_plus",
provider => 'powershell'
#CHECK THE PATH ON LINE 2 and the FEED on LINE 3
cd "C:\users\scott\Downloads"
$a = ([xml](new-object net.webclient).downloadstring("https://channel9.msdn.com/Series/CSharp-101/feed/mp4"))
$a.rss.channel.item | foreach{
$url = New-Object System.Uri($_.enclosure.url)
$file = $url.Segments[-1]
$file
if (!(test-path $file)) {
(New-Object System.Net.WebClient).DownloadFile($url, $file)
}
@iversond
iversond / domains.yaml
Last active November 21, 2021 00:57
Default domain configuration for the DPK. Used with Hiera Hashing to allow environments to overrride/add to the defaults
---
# TNSnames.ora
tns_admin_list:
"%{hiera('db_name')}":
db_host: "%{hiera('db_server')}"
db_port: "%{hiera('db_port')}"
db_protocol: TCP
db_service_name: "%{hiera('db_name')}.psadmin.io"
# Application Servers
@justintv
justintv / .bashrc
Created August 17, 2009 00:53
Display git branch in bash prompt
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"