Skip to content

Instantly share code, notes, and snippets.

View oviniciusfeitosa's full-sized avatar
🧛

Vinícius Feitosa da Silva oviniciusfeitosa

🧛
View GitHub Profile
@oviniciusfeitosa
oviniciusfeitosa / readme.md
Created October 3, 2019 19:23
Download files with AJAX (axios) + laravel + filename

Javascript:

export const getFile = (coArquivo, config = { responseType: 'blob' }) => instance.get(`/upload/${coArquivo}`, config)
  .then((response) => {
    const { headers } = response;
    const dadosFilename = headers['content-disposition'].split('filename=');
    const filename = dadosFilename[1];
  
    const url = window.URL.createObjectURL(new Blob([response.data]));
@oviniciusfeitosa
oviniciusfeitosa / default.conf
Created August 8, 2019 14:09
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;
@oviniciusfeitosa
oviniciusfeitosa / [SOLVED] Git - Refusing to merge unrelated histories.md
Last active December 2, 2019 16:17
[SOLVED] Git - `fatal: refusing to merge unrelated histories`
git merge develop --allow-unrelated-histories
@oviniciusfeitosa
oviniciusfeitosa / Javascript - Spread Operator.md
Created July 24, 2019 04:05
Javascript - Spread Operator.md
function minhaFuncao(v, w, x, y, z) {console.log(v,w,x,y,z) } var args = [0,1]; minhaFuncao(-1, ...args, 2, ...[3]);
@oviniciusfeitosa
oviniciusfeitosa / Git revert to commit.md
Created July 23, 2019 15:52
Git revert to commit.md
git revert --no-commit 0766c053..HEAD
git commit

Open the terminal and type the word below:

$ killall plasmashell
$ plasmashell &
@oviniciusfeitosa
oviniciusfeitosa / fixing wrong commit messages.md
Created June 11, 2019 22:27
Fixing wrong commit messages
    git rebase -i HEAD~4
@oviniciusfeitosa
oviniciusfeitosa / Remove all non used docker containers.md
Created April 16, 2019 15:38
Remove all non used docker containers.md
docker system prune
npm uninstall -g eslint
npm i eslint --save-dev
./node_modules/.bin/eslint --init