Skip to content

Instantly share code, notes, and snippets.

View foobarbaz-pl's full-sized avatar

Sebastian Cichosz foobarbaz-pl

  • Wrocław, Poland
View GitHub Profile
@foobarbaz-pl
foobarbaz-pl / mov-to-mp4.sh
Created January 18, 2023 08:02
Convert all MOV files to MP4
for i in *.mov; do ffmpeg -i "$i" -vcodec h264 -acodec mp2 "${i%.*}.mp4"; done
@foobarbaz-pl
foobarbaz-pl / fix_control.sql
Last active August 16, 2021 13:15
Oracle Fix Control
alter session set "_fix_control"='20648883:OFF';
select * from v$system_fix_control where bugno = '20648883';
select * from v$session_fix_control where bugno = '20648883';
@foobarbaz-pl
foobarbaz-pl / cgi_variables.sql
Created May 18, 2021 11:24
ORDS - Print CGI Variables
begin
for i in 1..nvl(owa.num_cgi_vars, 0) loop
htp.p(owa.cgi_var_name(i) || ': ' || owa.cgi_var_val(i));
end loop;
end;
@foobarbaz-pl
foobarbaz-pl / ig_scrollbar.css
Created March 8, 2021 16:33
Oracle APEX Interactive Grid Scrollbar always-on-top
#<ig-static-id> .a-GV-w-hdr{
overflow: auto!important;
}
@foobarbaz-pl
foobarbaz-pl / git_sparse.sh
Created February 22, 2021 10:11
Git Sparse Checkout
git clone --no-checkout <REPOSITORY> <DIR>
cd <DIR>
git sparse-checkout init --cone # checkout root dir files
git sparse-checkout set <SUBDIR_LIST> # subdirs list to include
git checkout
@foobarbaz-pl
foobarbaz-pl / build.sh
Created December 8, 2020 12:10
pacman - build and install package
# clone repo
makepkg -sCLf
pacman -U --noconfirm *.pkg.tar.zst
@foobarbaz-pl
foobarbaz-pl / session_holding_gtt.sql
Created August 6, 2020 10:17
Session Using Global Temporary Table
select sid
from v$lock
where type = 'TO'
and id1 = (select object_id
from dba_objects
where object_name = '&temp_table_name');
@foobarbaz-pl
foobarbaz-pl / plsql_conditional_script_execution.sql
Last active January 16, 2018 09:49
SQL*Plus Conditional Script Execution
-- activate substitution variables
set define on
-- suppress echo for substitution variables
set verify off
-- activate stdout
set serveroutput on
define _IF_MASTER_INSTANCE="--"
col master_instance new_value _IF_MASTER_INSTANCE noprint
@foobarbaz-pl
foobarbaz-pl / config_ccflags.sql
Last active January 15, 2018 16:47
PL/SQL Conditional Compilation
declare
l_sql varchar2(32767);
l_variables varchar2(1000) := '';
l_rac varchar2(50) := 'FALSE';
begin
if dbms_utility.is_cluster_database then
l_rac := 'TRUE';
end if;
l_variables := l_variables || 'RAC:' || l_rac || ',';
@foobarbaz-pl
foobarbaz-pl / decode_pwd.sql
Last active March 2, 2018 09:45
Decode PL/SQL Developer Preference File Passwords
declare
c_gr_len constant pls_integer := 4;
l_enc varchar2(100) := '&encoded_pwd';
l_dec varchar2(100);
l_key number;
l_val number;
l_mask number;
l_chars pls_integer;
begin
l_chars := length(l_enc) / 4 - 1;