Skip to content

Instantly share code, notes, and snippets.

View vaporwavie's full-sized avatar

Luiz Nickel vaporwavie

View GitHub Profile
@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 / 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 / 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 / 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 / android-sdk.sh
Created January 29, 2018 16:02
downloads and configures android sdk folder
cd $HOME
rm -Rf Android
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
unzip tools_r25.2.3-linux.zip -d Android
@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 / settings.json
Created September 27, 2017 17:54
Hacks for my VSCode env
{
"atomKeymap.promptV3Features": true,
"window.zoomLevel": 0,
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "Snazzy Operator"
}
@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 / .zshrc
Created May 30, 2017 12:52
Zsh snippets
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/luiznickel/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="afowler"
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->