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
| -- Prefer Oracle APEX user identity, but gracefully "descend" to lower contexts. Also works pretty well over DB links (avoiding static proxy user identity)! | |
| -- Note the regex call might have some performance implications for very high transaction rates. | |
| create or replace TRIGGER "SCHEMA"."TABLENAME_BIU" | |
| BEFORE INSERT or UPDATE on TABLENAME FOR EACH ROW | |
| DECLARE | |
| BEGIN | |
| if :new.ENTITY_UID is null then | |
| :new.ENTITY_UID := TABLENAME_ENTITY_UID_SEQ.nextval; | |
| end if; | |
| :new.AUTH_ID := UPPER(:new.AUTH_ID); |
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/bash | |
| # Send a notification to a MS Teams channel's webhook interface. | |
| # Note: originally crafted in a Solaris 11 env. | |
| # usage: im_notify.sh --envcontext TEST --infocontext "ERP System Patching" --infotask "$0 - Apply vendor patch #1" --infostatus "FAILURE" --message "Patching script encountered error! Attention required." | |
| # usage: im_notify.sh --envcontext DEV --infocontext "Long Process Progress" --infotask "$0 script run" --infostatus "SUCCESS" --message "OK, step complete, ready for next step." | |
| # justin.warwick@gmail.com 2021 | |
| # TODO: parameter to indicate CC message to syslog as well (with local logger) | |
| #Standard Config | |
| SupportURL="https://support.contoso.com/newIssue" |
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
| //just a little alternative to the eye-ball-icon revealer that is meant for sensitive information on a page (to mitigate shoulder-surfing attacks). | |
| (function() { | |
| document.onmousemove = handleMouseMove; | |
| function handleMouseMove(event) { | |
| var eventDoc, doc, body; | |
| event = event || window.event; // IE-ism | |
| // If pageX/Y aren't available and clientX/Y are, | |
| // calculate pageX/Y - logic taken from jQuery. |
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
| 'Quick and dirty hexdump of a string for debugging stuff | |
| ' Convert string to bytes | |
| Dim subjectSring As String | |
| Dim abData() As Byte | |
| 'read in suspect string into subjectSring here... | |
| abData = StrConv(subjectSring, vbFromUnicode) | |
| For i = 0 To UBound(abData) | |
| Debug.Print Hex(abData(i)); "='" & Chr(abData(i)) & "'" | |
| Next |
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
| rule "AD User Lockout event summarize" | |
| when | |
| has_field("winlogbeat_event_data_TargetUserName") | |
| AND contains(to_string($message.winlogbeat_event_id), "4740") | |
| then | |
| //Build up and add a summary field | |
| let summarized_message = concat(to_string($message.winlogbeat_event_data_TargetUserName), " locked out from domain "); | |
| let summarized_message = concat(summarized_message, to_string($message.winlogbeat_event_data_SubjectDomainName)); | |
| let summarized_message = concat(summarized_message, "\n\n Reported from "); | |
| let summarized_message = concat(summarized_message, to_string($message.source)); |
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
| echo "Reconfigure RHEL Cockpit to use our intranet wildcard SSL cert:" | |
| sudo su - | |
| export DOMAIN="your.intranet.domainname.here" | |
| cd /etc/cockpit/ws-certs.d | |
| scp root@knownalreadyconfigured.apachehttp.server.${DOMAIN}:/etc/httpd/custom-cert/star* . | |
| curl -LO https://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1.crt.pem | |
| cat DigiCertTLSRSASHA2562020CA1.crt.pem >> star.${DOMAIN}.crt | |
| cat star.${DOMAIN}.crt.key >> star.${DOMAIN}.crt | |
| mv star.${DOMAIN}.crt star.${DOMAIN}.cert | |
| remotectl certificate |
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
| //prerequisite: assign a static ID to your hero region. | |
| //gets offset and height for total displacement | |
| var heroRegionStaticID = "#pageNavCards"; | |
| var bottomofpageNavCards = $(heroRegionStaticID).offset().top + $(heroRegionStaticID).outerHeight(); | |
| $(window).scroll(function(){ | |
| if($(window).scrollTop() > bottomofpageNavCards){ | |
| $("#t_Body_title h1").fadeOut(); | |
| $("#t_Body_title div.t-HeroRegion-col.t-HeroRegion-col--left").fadeOut(); | |
| } |
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/bash | |
| function monthnumber { | |
| month=$(echo ${1:0:3} | tr '[a-z]' '[A-Z]') | |
| MONTHS="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC" | |
| tmp=${MONTHS%%$month*} | |
| month=${#tmp} | |
| monthnumber=$((month/3+1)) | |
| printf "%02d\n" $monthnumber | |
| } |
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
| pushd `git rev-parse --show-toplevel` | |
| git fetch | |
| git checkout gh-pages | |
| git pull | |
| git branch -vv ; git status -vv | |
| git worktree add ./omaster origin/master | |
| cp -uv omaster/LICENSE . | |
| cp -uv omaster/README.md . |
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
| Macro_radio-ize: | |
| ExportOgg: | |
| ExportMp3: |