Saturday, July 13, 2019

insufficient permissions for device

retrieving device properties for ro.product.cpu.abi:
error: insufficient permissions for device: user in plugdev group; are your udev rules wrong?

--> change Charge devic to PTP on USB config of Phone

Friday, July 12, 2019

Monday, May 6, 2019

Oracl basics

source /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh

/etc/init.d/oracle-xe start

/etc/init.d/oracle-xe stop

sqlplus / as sysdba

Thursday, October 25, 2018

Scale Firefox and Chrome on HIDPI

Firefox:
about:config
layout.css.devPixelsPerPx --> change value from 1.5 to 3

Chrome
Open a terminal 

sudo gedit /usr/share/applications/google-chrome.desktop

Find this line:
Exec=/usr/bin/google-chrome-stable %U
Change n into 1.5 to 3:
Exec=/usr/bin/google-chrome-stable --force-device-scale-factor=n %U

Save/close, relaunch Chrome.


Wednesday, August 8, 2018

Change owner all database objects to new role

for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" DBNAME` ; do  psql -c "alter table \"$tbl\" owner to NEWUSER" DBNAME ; done

for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" DBNAME` ; do  psql -c "alter table \"$tbl\" owner to NEWUSER" DBNAME ; done

for tbl in `psql -qAt -c "select table_name from information_schema.views where table_schema = 'public';" DBNAME` ; do  psql -c "alter table \"$tbl\" owner to NEWUSER" DBNAME ; done

Thursday, August 2, 2018

Kill session on Linux

detect sessions
who

list process id off specified session (ex pts/3 )
ps -dN|grep pts/3

kill processid
kill -9 processid

--
kill all sessions of specified user
skill -KILL -u name_of_user

VirtualBox common command


VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
vboxmanage export vmname -o vmname.ova
vboxmanage import vmname.ova

VBoxManage list vms

vboxmanage clonevm "currentmachine" --name NewMachineName --register

VBoxManage startvm "Machine_Name" --type headless

VBoxManage controlvm "Machine_Name" poweroff | reset | savestate

VBoxManage unregistervm "Machine_Name" --delete

Config CPUs:
VBoxManage modifyvm "vm name" --cpuhotplug off
VBoxManage modifyvm "vm name" --cpus 4

Config Memory:
VBoxManage modifyvm "vm name" --memory 16000

sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack


vboxmanage dhcpserver modify --netname HostInterfaceNetworking-vboxnet0 --disable
vboxmanage list dhcpservers