Skip to content

Instantly share code, notes, and snippets.

phackwer

Block or report user

Report or block phackwer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:863246d4f05f1aa86786b59106a943fc
sudo gedit /etc/systemd/system/rc-local.service
Then add the following content to it.
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
@phackwer
phackwer / gist:5207d76b189794d68fe37401d046b742
Last active Feb 13, 2020
Scroll on non-scrollwheel devices
View gist:5207d76b189794d68fe37401d046b742
Just install mouseemu by:
sudo apt-get install mouseemu
and edit "/etc/default/mouseemu" and add the line:
SCROLL="-scroll 56"
126 is the key scan code for the right super key. you can find other key codes by using showkey in the terminal. now restart mouseemu:
View gist:07d3da53aa33231ed4905c62d0dbee67
gsettings set org.gnome.settings-daemon.peripherals.mouse locate-pointer true
@phackwer
phackwer / gist:ef2819332f9c5a1d7572c7ada1e68b89
Created Dec 11, 2019
SonarQube on Docker and local scanner
View gist:ef2819332f9c5a1d7572c7ada1e68b89
# SONAR QUBE SERVER RUN
docker run --rm \
-p 9000:9000 \
-v sonarqube_conf:/opt/sonarqube/conf \
-v sonarqube_extensions:/opt/sonarqube/extensions \
-v sonarqube_logs:/opt/sonarqube/logs \
-v sonarqube_data:/opt/sonarqube/data \
sonarqube
View gist:1517484769a4330c9ffc9b8e1e24d1fc
Get a list of branches
for remote in `git branch -r `; do git branch --track $remote; done
Remove merged remote branches
git branch --merged master | grep -v master | cut -d/ -f2- | xargs -n 1 git push --delete origin
Remove merged local branches
@phackwer
phackwer / XGH - en.txt
Created Apr 1, 2019 — forked from banaslee/XGH - en.txt
eXtreme Go-Horse Process
View XGH - en.txt
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).
View AngularJS Scope Debugging in Console
Selecione para inspecionar qq item na tela que esteja no escopo da controller e rode o seguinte comando no console:
var scope = angular.element($0).scope()
Agora vc pode usar a scope e ateh modificar os arrays manualmente
View Ubuntu 18.04 Gnome must have
The pre-installed GNOME Calculator in Ubuntu 18.04 is a snap application which may lack some features provided by the traditional one due to restrictions of snap packages.
Remove the snap application by running
snap remove gnome-calculator
and install the traditional apt one by running
sudo apt install gnome-calculator
You may need to to restart GNOME shell by hitting Alt+F2, then typing r and pressing Enter for it to take effect.
@phackwer
phackwer / gist:9f9db7bc95396a48b240f5c3a42cf944
Last active Feb 1, 2019
Undervolting linux ubuntu 18.04 (XPS 9570 i9 32GB RAM)
View gist:9f9db7bc95396a48b240f5c3a42cf944
Very useful for the i9 XPS 9570 overheating on Linux. Since I use Linux for development, I don't use the nvidia that comes
with the note and also don't need turboboost enabled, even running dozens of docker containers. I was having problems with
temperature. Notebook was getting so hot it was hard to type for more than 4 hours straight.
Here are my temperatures before undevolting:
phackwer@phackwer-XPS-15-9570 ~/P/p/poc> sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +53.0°C (high = +100.0°C, crit = +100.0°C)
View gist:af450e008ab073d90e832f7e7ffafb84
https://medium.com/@tomwwright/better-battery-life-on-ubuntu-17-10-4588b7f72def
https://www.dell.com/community/Inspiron/Suspend-resume-problems-on-Ubuntu-18-04/td-p/6072410
https://github.com/iberianpig/fusuma
https://martys.typepad.com/blog/2015/08/3-finger-drag-on-linux.html
https://askubuntu.com/questions/744364/displaylink-asus-mb168b-issues
You can’t perform that action at this time.