- Evaluate query:
EXPLAIN PLAN FOR <sql query as usual>;
- View evaluation:
SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
This file contains 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
from pydub import AudioSegment | |
from io import BytesIO | |
from scipy.io import wavfile | |
# get file | |
audio_file = AudioSegment.from_wav("some.wav") | |
# create output, supply to AudioSegment | |
audio_sample = BytesIO() | |
audio_file[2000:5000].export(audio_sample, format='wav') |
This file contains 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
#Tweaked from https://blogs.s-osg.org/retain-history-moving-files-git-repositories/ | |
# Pull your new location | |
git clone <your new repo> | |
cd /path/to/new/repo | |
# Link to old location and crate a branch off it | |
git remote add old-location ssh://git@github.com/organization/repo.git # or HTTPS | |
git fetch old-location |
This file contains 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
-- A way to find un-closed Oracle SQL queries | |
-- Taken from https://srivenukadiyala.wordpress.com/2011/02/15/one-way-to-detect-jdbc-connection-leaks/ | |
-- Get a count of sessions per machine: | |
select machine, count(*) | |
from v$session | |
where username = 'user name' | |
and machine like 'machine name' | |
and program = 'JDBC Thin Client' | |
group by machine |
This file contains 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/sh | |
# Taken from StackOverflow and modified lightly. | |
# | |
# For general keytool tips, this site is useful: | |
# https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html | |
# | |
# Also, if you goof, can remove simply using: | |
# keytool -delete -alias ourdomain -keystore pc.keystore | |
# Also also: If you are given a PEM file, you can try the following instead: |
This file contains 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
# Taken from https://theptrk.com/2018/07/11/did-txt-file/ | |
vim +'normal Go' +'r!date' +'normal o' ~/Desktop/did.txt |
Note: Taken from this website
export MW_HOME=<location of your weblogic directory>
export DOMAIN_HOME=$MW_HOME/user_projects/domains/<domain_name>
export CLASSPATH=$CLASSPATH:$MW_HOME/wlserver_10.3/server/lib/weblogic.jar
. $DOMAIN_HOME/bin/setDomainEnv.sh
This file contains 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
# Add to .bashrc or similar runcommand file | |
function ticket() { | |
FILE=${1}.txt | |
FILE_LOC=~/Desktop/${1}.txt | |
# Check if file exists | |
stat ${FILE_LOC} > /dev/null 2>&1 | |
EXISTS=$? |
This file contains 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
<target name="example"> | |
<script language="javascript"> | |
// JS can be written here: | |
var example = function(a,b) { | |
print(b + " " + a); | |
}; | |
example("test", "hi"); | |
</script> | |
</target> |
This file contains 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
select S.USERNAME, s.sid, s.serial#, s.osuser, t.sql_id, sql_text | |
from v$sqltext_with_newlines t,V$SESSION s | |
where t.address =s.sql_address | |
and t.hash_value = s.sql_hash_value | |
and s.status = 'ACTIVE' | |
and s.username <> 'SYSTEM' | |
order by s.sid,t.piece | |
; |
OlderNewer