Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Anibal anibalardid

🏠
Working from home
Block or report user

Report or block anibalardid

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 how-to-add-keyboard-bash-config-backlight.txt
Probar encendido:
echo 3 > /sys/class/leds/asus::kbd_backlight/brightness
Probar apagado:
echo 0 > /sys/class/leds/asus::kbd_backlight/brightness
(1)Crear 2 scripts:
nano /home/anibal/leds_down.sh
Code:
#!/bin/bash
@anibalardid
anibalardid / Docker on windows 10 home
Created Feb 12, 2020
Install docker on windows 10 home
View Docker on windows 10 home
https://itnext.io/install-docker-on-windows-10-home-d8e621997c1d
@anibalardid
anibalardid / webpack.config.js
Created Jan 14, 2020
angularjs webpack proxy configuration
View webpack.config.js
devServer: {
historyApiFallback: true,
watchOptions: { aggregateTimeout: 300, poll: 1000 },
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
},
proxy: {
'/doc-html/*': {
@anibalardid
anibalardid / proxy.conf.json
Created Jan 14, 2020
add proxy path to angular8
View proxy.conf.json
"/doc-html": {
"target": "http://pruebas.local",
"secure": false,
"logLevel": "debug",
"changeOrigin": true,
"pathRewrite": { "^/doc-html" : "" }
}
@anibalardid
anibalardid / batteryalert.sh
Created Jan 9, 2020
bash ubuntu script low battery alert
View batteryalert.sh
#!/bin/bash
battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`
if [ $battery_level -le 10 ]
then
notify-send "Battery low" "Battery level is ${battery_level}% !!!"
fi
View resize-tmpfs-partition.txt
https://www.golinuxcloud.com/change-tmpfs-partition-size-redhat-linux/
Default:
none /dev/shm tmpfs defaults 0 0
To:
none /dev/shm tmpfs defaults,size=2G 0 0
For the changes to take effect immediately remount /dev/shm:
@anibalardid
anibalardid / vim-trick-sudo.txt
Created Nov 20, 2019
Edit file in VIM without sudo, but save with sudo
View vim-trick-sudo.txt
Edit file in VIM without sudo, but save with sudo
Have you ever edited some configs file and forgot to sudo? Me too... There is a trick to save the file anyway, just type in VIM:
:w !sudo tee %
@anibalardid
anibalardid / ubuntu-minimize-dock.sh
Created Nov 8, 2019
ubuntu minimize window when click in dock
View ubuntu-minimize-dock.sh
#set
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
#reset to default
gsettings reset org.gnome.shell.extensions.dash-to-dock click-action
@anibalardid
anibalardid / ansible-git-pull.txt
Created Oct 4, 2019
ansible recipe git pull in directory
View ansible-git-pull.txt
tasks:
- name: pull from git
git:
repo: git@gitlab.com:repo.git
dest: /path/destiny
update: yes
version: master
You can’t perform that action at this time.