Skip to content

Instantly share code, notes, and snippets.

View niya3's full-sized avatar

ildar nizamov niya3

  • Positive Technologies
  • Nizhny Novgorod, Russia
View GitHub Profile
@guilhem
guilhem / README.md
Last active May 28, 2022 06:09
Optimization for Dell XPS 13 7390 2-in-1 on Ubuntu 19.10 (2019-10-27)

Bios

Disable:

  • thunderbolt → wakeup from suspend (fix in 5.4)
  • fingerprint → no driver for Goodix Fingerprint
  • camera → no driver for Intel AVStream Camera

Services

Disable:

@89luca89
89luca89 / install_powersave.sh
Last active January 21, 2023 20:11
Powersave Rules for Linux | Run and reboot. Consider using the commented tweaks in grub for advanced powersaving
#UDEV rules to handle powersaving
# pcie_aspm=force IN GRUB
echo '
# Some logging
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/bin/sh -c '"'"'echo Unplugged $(date) >> /var/log/powerlog.log'"'"'"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/bin/sh -c '"'"'echo Plugged $(date) >> /var/log/powerlog.log'"'"'"
# CPU Bias power/performance toggle
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/bin/x86_energy_perf_policy power"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/bin/x86_energy_perf_policy performance"
# Periferals power saving features
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 9, 2024 16:02
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@mmrko
mmrko / git-zsh-checkout-autocomplete-local-only.md
Last active July 20, 2023 08:48
List only local branches when autocompleting git checkout (Zsh)
git config --global alias.checkoutr checkout
$EDITOR /usr/local/share/zsh/site-functions/git-completion.bash

...and then modify the file as follows...

-__gitcomp_nl "$(__git_refs '' $track)"
+if [ "$command" = "checkoutr" ]; then
+    __gitcomp_nl "$(__git_refs '' $track)"
+else
@arobson
arobson / abstractions.md
Last active October 14, 2021 06:46
Rabbit.MQ + Node.js Notes

Abstraction Suggestions

Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.

Broker

As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:

  • publish
  • request
  • start/stop subscription