Skip to content

Instantly share code, notes, and snippets.

View dac73's full-sized avatar
Ship it

Dario Tislar dac73

Ship it
  • Digital Cloud Consulting ltd
  • Croatia
View GitHub Profile
@dac73
dac73 / various-scripts.md
Created November 16, 2018 08:49
Laptop shenenigans

UDEV rule

/etc/udev/rules.d/90-xhc_sleep.rules
# disable wake from S3 on XHC1
SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"

/etc/systemd/system/mbpfan.service

[Unit]
Description=A fan manager daemon for MacBook Pro
@dac73
dac73 / amd_gpu.txt
Created October 30, 2018 18:50
AMD gpu info
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
%%%%% Information
%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- AMD Graphics Cards
- Ubuntu 16.04
@dac73
dac73 / python3.py
Last active October 19, 2018 15:14
python shenanigans
# upload artifact to nexus3 via python
artifact_name=os.path.basename(zipped_log_file)
headers = {'Content-Type': 'application/binary'}
with open(zipped_log_file, 'rb') as artifact:
requests.put(nexus_url + '/' + artifact_name, headers=headers,
data=artifact, auth=(nexus_username, nexus_password))
# get pip for python36 on f29+
wget https://bootstrap.pypa.io/get-pip.py
python3.6 get-pip.py
@dac73
dac73 / s3.sh
Last active December 10, 2018 04:57
aws cli
# get latest objects from S3 bucket
aws s3api list-objects --bucket {S3-bucket-name} --query "Contents[?LastModified>=\`$(date +%Y-%m-%d)\`][]"