Skip to content

Instantly share code, notes, and snippets.

View alvarosacari's full-sized avatar
🏠
Working at home

Alvaro Sacari alvarosacari

🏠
Working at home
View GitHub Profile
@alvarosacari
alvarosacari / gist:7cd8968f10b5ba8ef54a0d9d23b83b79
Last active June 18, 2021 21:39
Conventional Commits examples
Extracted from: `https://github.com/monicahq/monica/commits/master`
build: fix docker build
build: use semantic-release-github-pullrequest
chore(i18n): update translations
chore(deps): update dependencies
chore(deps): update to Laravel 8
chore(deps): security upgrade axios from 0.20.0 to 0.21.1
chore(deps): update vue deps
@alvarosacari
alvarosacari / upload.js
Created July 8, 2020 22:50 — forked from virolea/upload.js
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@alvarosacari
alvarosacari / have_several_versions_of_php_in_ubuntu.md
Last active April 15, 2021 02:49
Have several versions of php in ubuntu

Have serveral versions of php in ubuntu

Add reporsitory

sudo add-apt-repository ppa:ondrej/php

This repository contains all the released versions of PHP till date.

@alvarosacari
alvarosacari / convert_vue_object_to_normal_object.md
Created August 26, 2019 22:56
Convert Vue object to normal object

Convert Vue object to normal object

const obj = this.dataObject
const newObject = JSON.parse(JSON.stringify(obj))
@alvarosacari
alvarosacari / download_files_with_axios.md
Last active December 27, 2019 16:35
download files with axios

Download files with axios

Example with blob

axios({
  url: 'http://api.dev/file-download',
  method: 'GET',
  responseType: 'blob', // important
}).then((response) => {
@alvarosacari
alvarosacari / .htaccess
Created August 16, 2019 21:41
Force SSL to codeigniter 3
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>
@alvarosacari
alvarosacari / config
Last active April 29, 2019 05:15
i3 config file ~/.config/i3/config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!