Skip to content

Instantly share code, notes, and snippets.

View vaporwavie's full-sized avatar

Luiz Nickel vaporwavie

View GitHub Profile
@vaporwavie
vaporwavie / fixsudo.md
Last active January 29, 2018 16:09
Consertando problemas com sudo

Algo foi feito entre as partições que as configurações do sudoers não foi mapeada.

O problema disso é que não é algo fácil de se resolver, já que é algo muito UNIX-related. Reinstalar o sistema do ZERO é mais rápido e resolve o problema, mas se você quiser ser hardcore e insistir em resolver a causa, procure um jeito de remover os recursos que o /etc/fstab tem. Você só consegue fazer isso no modo de emergência do grub (o modo rescue "grub>"), e pessoalmente falando, é um inferno

sed -i.bak "@^$SERVERADDR:$DIRPATH@d" /etc/fstab

  • Onde sed é um editor de strings do UNIX
  • -i.bak é a inserção que colocará o arquivo original como backup pra garantir rollback
  • @^$SERVERADDR:$DIRPATH@d é uma expressão regular pra remover a linha que você quer.
  • /etc/fstab é o parâmetro, que é o arquivo que você quer mexer.
@vaporwavie
vaporwavie / settings.json
Last active January 29, 2018 16:10
snippet for excluding default folders from the project folder
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true,
"node_modules": true
}
@vaporwavie
vaporwavie / fixlag.md
Last active January 29, 2018 16:13
fix mouse and performance issues on ubuntu 17.10

Ubuntu 17.10 uses wayland by default. However, you can switch back to Xorg, without to install anything, all you need to do is

  • Log out from you current user.
  • Under the password, near the "unlock" button, you will have something like a settings-icon.
  • Click it, and choose the second option(the one says "xorg")

And there you have it! the good old xorg session, with no more cursor lags! Switching to an Xorg session from the log in screen should solve it.

Source: https://askubuntu.com/questions/966651/mouse-lagging-on-ubuntu-17-10

@vaporwavie
vaporwavie / fixdisplay.md
Last active January 30, 2018 00:48
this is a workaround for Ubuntu 17.X, which now uses Wayland as default window manager. this change is causing some bugs on outdated apps, such as gparted and gedit. this will fix for now.

If running Ubuntu 17.10 or newer, this issue can arise when an application has not been updated with full support for Wayland.

As a workaround until the application is updated, you can run

xhost +SI:localuser:root

which will allow the root user to display applications on your desktop.

Source: https://askubuntu.com/a/981508

@vaporwavie
vaporwavie / mount.md
Last active February 2, 2018 02:38
Mount partition at startup

GUI guided

Type gnome-disks on your terminal (Ubuntu >= 13.10)

While on the program:

  • Select Drive
  • Then your partition
  • Click "More actions (cogs icon)" button
  • Access 'Edit Mount Options'
@vaporwavie
vaporwavie / fixlaravel.md
Last active February 10, 2018 00:52
fix laravel shortcut

If you're using Ubuntu 16.04.

You need to find the composer config files in my case is: /.config/composer or in other cases ~/.composer/. you can see the dir after this command: composer global require "laravel/installer" After Laravel Installed you can find your laravel in /.config/composer/vendor/laravel/installer/ and you will find the Laravel shortcut command in here : /.config/composer/vendor/bin/

set your .bashrc (or .zshrc) using nano ~/.[bash|zsh]rc and export your composer config file:

@vaporwavie
vaporwavie / fixcolor.md
Created February 11, 2018 04:00
Vim Bootstrap requires some additional package in order to work properly. Here is the fix
# run in "root" folder (e.g /home/datmusic/api.datmusic.xyz/)
chown -R datmusic:www-data storage .env
find storage -type f -exec chmod 664 {} \;
find storage -type d -exec chmod 775 {} \;
chgrp -R www-data storage .env
chmod -R ug+rwx storage .env
@vaporwavie
vaporwavie / vscode.txt
Last active April 14, 2019 03:12
VSCode extensions that I use daily.
emmanuelbeziat.vscode-great-icons-2.1.46
fireyy.vscode-language-todo-1.2.3
ms-vscode.atom-keybindings-3.0.5
ms-vsliveshare.vsliveshare-0.3.1136
philsinatra.popping-and-locking-vscode-black-1.1.6
shardulm94.trailing-spaces-0.2.11
vincaslt.highlight-matching-tag-0.8.6
wix.vscode-import-cost-2.12.0
bierner.emojisense
eamodio.gitlens
@vaporwavie
vaporwavie / .hyper.js
Created May 7, 2019 12:44
hyper js file
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',