Skip to content

Instantly share code, notes, and snippets.

View frayos's full-sized avatar

Younes frayos

View GitHub Profile
@frayos
frayos / listingLibPermIDLoginsUsers.sas
Last active April 12, 2018 09:35
Listing of Metadata defined Librairies, permissions, identitites, logins, users and groups
/************************************************************
Author Nicolas Housset
/******************************************/
%macro getMetaInfos(EXCELFILE,OUTPUTFORMAT);
data metadata_libraries;
length uri serveruri conn_uri domainuri libname ServerContext AuthDomain path_schema
usingpkguri type tableuri coluri $256 id $17
@frayos
frayos / kerbero.sh
Last active February 28, 2018 09:02
Kerberos Debugging
-debug –serverlog
-Dsun.security.krb5.debug=true -Dsun.security.jgss.debug=true
"C:\Program Files\SASHome\SASPrivateJavaRuntimeEnvironment\9.4\jre\bin\klist.exe"
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA
reg query HKLM\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters
@frayos
frayos / notepadSimple.html
Created February 14, 2018 12:16
Simple Notepad with save feature
data:text/html,<button onClick="SaveTextArea()">Save</button> <script language="javascript" type="text/javascript"> function SaveTextArea() { window.location = "data:application/octet-stream," + escape(txtBody.value); } </script> <textarea id="txtBody" style="width:100%; height:100%; padding:20px; font-size:2em; font-family: SAS Monospace; color:darkblue; border:none; border-left: 10px solid lightblue; margin-left: 30px;outline: none" autofocus> </textarea>
@frayos
frayos / notepadEvolved.html
Created February 14, 2018 12:16
Simple HTML Notepad with save and features
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="http://g.etfv.co/http://www.sublimetext.com"/><!-- Add favicon from sublimetext -->
</head>
<title>Local Text Editor</title>
<style>
body { background:#E8E8E8 }
.note { background:#FFF; border:1px solid #DADADA; box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1),inset 0 -1px 0 rgba(0, 0, 0, 0.07); color:#666; font-family:helvetica; font-size:1rem; line-height:1.4; margin:3rem auto; padding:0.4rem 2.5rem 2rem; position:relative; width:45rem; }
.note span { background:#E8E8E8; color:#fff; cursor:pointer; display:inline-block; font-weight:bold; height:25px; left:0; position:absolute; text-align:center; top:0; width:25px; }
@frayos
frayos / strace.sh
Created February 19, 2018 13:25
strace args
strace -s 512 -tt -f -p PID -o /tmp/straceTRKNUM.log
#f = child
#s = line size
#tt = time micro sec
#p = pid
@frayos
frayos / SASEVMCleanup.sas
Created February 20, 2018 15:07
SAS EVM clean
1. Folder D:\SASConfigFolder\Lev2\Web\SASEnvironmentManager\emi-framework\apm\Data\artifacts
** artifactusagedetails ***
You can exclude information for the technical user from the datasets in the APM data mart. E.g. to exclude information for the technical user in dataset artifactusagedetails.sas7bdat following steps could be used.
1. Make a backup of file "logusagecombine.sas" located in <configdir>/Lev1/Web/SASEnvironmentManager/emi-framework/apm/SASEnvironment/SASMacro
2. Open file "logusagecombine.sas"
3. Search for section
%addtzoffvar(datetime=datetime, hostvar=hostname, outvar=tzoneoff, form=DATASTEP);
@frayos
frayos / TessaImprove.js
Last active February 22, 2018 13:19
Tessa Improvements
/* Chrome Custom JavaScript for websites */
// Resize the search box area
$('[name="fqt"]').attr('size','120');
// Resize the banner
var windowWidth = $( window ).width();
$('#bannerBG').find('table').attr('width',windowWidth);
$('#bannerAppTitle').find('table').attr('width',windowWidth);
$('#bannerUtilityMenu').find('table').attr('width',windowWidth);
$('#bannerSASLogo').find('table').attr('width',windowWidth);
@frayos
frayos / ViewSetinitMetadata.sas
Created February 23, 2018 14:56
View Metadata Setinit SAS
/***************************************************/
/*** Sample program to pull any TextStore object ***/
/*** from metadata that contains setinit info. ***/
/*** ***/
/*** IMPORTANT: Before running this code, be ***/
/*** sure you modify the initial OPTIONS ***/
/*** statement to provide values that are ***/
/*** appropriate for your metadata server ***/
/*** IMPORTANT: edit the FILENAME statement to ***/
/*** reference a valid path where your ***/
@frayos
frayos / caslib.sas
Last active January 21, 2025 17:32
CASLIB examples
/* PostgreSQL Multi Node Serial */
caslib pgdvd datasource=(
srctype="postgres",
username="casdm",
password="xxxxxx",
server="sasdb.race.sas.com",
database="dvdrental",
schema="public",
numreadnodes=3) ;
@frayos
frayos / PostgresPassword.sh
Created February 27, 2018 11:56
Viya Postgres DBMS Owner Password
export PGPASSWORD=`sudo -u sas /opt/sas/viya/home/bin/sas-bootstrap-config --token-file /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/client.token kv read 'config/application/postgres/password'`