Skip to content

Instantly share code, notes, and snippets.

atuwa tiika

Nayana Hettiarachchi devzer01

atuwa tiika
View GitHub Profile
View bootlog
sudo log show --predicate "processID == 0" --start $(date "+%Y-%m-%d") --debug
alias bootlog='sudo log show --predicate "processID == 0" --start $(date "+%Y-%m-%d") --debug'
devzer01 / proc_cpuinfo
Created Jul 25, 2020
ACER Aspire 3 A314-32-43NH
View proc_cpuinfo
(chroot) livecd / # cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 21
model : 112
model name : AMD A4-9120e RADEON R3, 4 COMPUTE CORES 2C+2G
stepping : 0
microcode : 0x6006705
cpu MHz : 1361.900
cache size : 1024 KB
devzer01 / docker-compose.yml
Last active Dec 1, 2021
docker-compose mongodb
View docker-compose.yml
version: '3'
image: 'mongo'
container_name: 'my-mongo-container' # give your contatner a name
- MONGO_INITDB_DATABASE=your-database-name # database name you want to make
- MONGO_INITDB_ROOT_USERNAME=my-container-root-username # set your container root username
- MONGO_INITDB_ROOT_PASSWORD=secret # set your contatner root password
View spring-boot-dependencies.xml
devzer01 / i18n.js
Created Mar 14, 2020
fix one problem and create many for no good reason code
View i18n.js
var content = document.createElement('div') = 'alert'; = '100%';
content.innerHTML = 'tax translation helper is loaded'; = '100px'; = 'center'; = 'none';
var body = document.getElementsByTagName('body')[0];
devzer01 / kill-pgsql-session.sql
Created Feb 14, 2020
killing postgresql sessions
View kill-pgsql-session.sql
-- this query kills any active session attached to the 'dbname' database, which can prevent you from
-- running certain administrative operations on the database
select pg_terminate_backend(pid)
from pg_stat_activity
where pid IN (select pid from pg_stat_activity where datname = 'dbname');
devzer01 /
Created Feb 14, 2020
gitlab pipeline run until pass looper.
PRIVATE_TOKEN="create from your gitlab profile"
TRIGGER_TOKEN="get from the project ci/cd triggers"
PROJECT_ID="you can find this using gitlab api or under the gitlab project settings"
REF="master" #this can also be a branch name or a commit hash
while true
View tux-shortcuts.txt
# tmux shortcuts & cheatsheet
start new:
start new with session name:
tmux new -s myname
devzer01 /
Created Jan 12, 2020
Shell script to be used in emergency when your Final Cut Pro has taken up over 50% of drive space, and you can't operate the Mac in any normal fashion
EXTERNAL_BACKUP_DIR="/Volumes/data disk"
mv "$LIBRARY_NAME" $EXTERNAL_BACKUP_DIR/ & #send the move to background
# monitor the destination path
raw footage library % lastSize=`du -s "$EXTERNAL_BACKUP_DIR/$LIBRARY_NAME" | tr '\t' ' ' | cut -d' ' -f1`;
while true
devzer01 /
Created Jan 11, 2020
kernel panic mac os catalina
panic(cpu 4 caller 0xffffff7f8132f948): "XHC2(MacBookPro15,3): thunderbolt power on failed 0xffffffff\n"@/BuildRoot/Library/Caches/
Backtrace (CPU 4), Frame : Return Address
0xffffffa3bfc83a60 : 0xffffff8000937beb
0xffffffa3bfc83ab0 : 0xffffff8000a6f4b5
0xffffffa3bfc83af0 : 0xffffff8000a60f2e
0xffffffa3bfc83b40 : 0xffffff80008dea40
0xffffffa3bfc83b60 : 0xffffff80009372d7
0xffffffa3bfc83c60 : 0xffffff80009376bb
0xffffffa3bfc83cb0 : 0xffffff80010ce059
0xffffffa3bfc83d20 : 0xffffff7f8132f948