Skip to content

Instantly share code, notes, and snippets.

View fabiofdsantos's full-sized avatar

Fábio Santos fabiofdsantos

View GitHub Profile
@fabiofdsantos
fabiofdsantos / nginx_nuxtjs.conf
Last active September 23, 2021 22:35
Nginx config for NuxtJS with dynamic routes
server {
listen 80;
server_name my_app.com;
index index.html index.htm;
charset utf-8;
access_log off;
error_log /dev/null;
@fabiofdsantos
fabiofdsantos / vee-validate-custom-error.ts
Created May 27, 2020 15:58
vee-validate: set custom error to validation provider #Vue.js #TypeScript
setError(msg: string): void {
const provider = this.$refs.provider as InstanceType<
typeof ValidationProvider
>
provider.applyResult({
errors: [msg],
failedRules: {},
})
},
@fabiofdsantos
fabiofdsantos / 📊 Weekly development breakdown
Last active October 29, 2020 00:15
Weekly development breakdown
Vue.js 11 hrs 3 mins █████████▎░░░░░░░░░░░ 44.1%
TypeScript 5 hrs 50 mins ████▉░░░░░░░░░░░░░░░░ 23.3%
PHP 5 hrs 42 mins ████▊░░░░░░░░░░░░░░░░ 22.8%
JSON 48 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.3%
JavaScript 25 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.7%
@fabiofdsantos
fabiofdsantos / YTD Strava Metrics
Last active May 2, 2024 00:10
YTD Strava Metrics
Running 0.00 km ░░░░░░░░░░░░░░░░░░░ 0.00/h
Swimming 0.00 km ░░░░░░░░░░░░░░░░░░░ 0.00/h
Cycling 186.91 km ███████████████████ 18.16/h
Last month 111.05 km 18 achievements 6:41h
@fabiofdsantos
fabiofdsantos / install-nodejs-npm-ubuntu.md
Created September 27, 2019 14:05
How to install nodejs & npm in Ubuntu

How to install nodejs & npm in Ubuntu

Avoid any system permissions issue :-)

curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh
bash install_nvm.sh
source ~/.profile
nvm install 10.16.3
nvm use 10.16.3
@fabiofdsantos
fabiofdsantos / rules.v4
Created November 4, 2018 21:35
Basic iptables to allow http, https and ssh
# Generated by iptables-save v1.4.21 on Mon Apr 25 12:53:52 2016
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp -s hostname.com --dport 22 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
@fabiofdsantos
fabiofdsantos / .bowerrc
Last active August 10, 2018 08:52
[Integration] Install AdminLTE in Laravel 5.6
{
"directory": "./resources/assets/vendor"
}
@fabiofdsantos
fabiofdsantos / git_cmd_to_count_lines_changed.txt
Last active April 3, 2018 10:01
[Git] Count lines changed on multiple commits by a certain author
git log --author="Fábio Santos" --oneline --shortstat --after="2017-01-01" | grep -E " files? changed,"
@fabiofdsantos
fabiofdsantos / install-php-on-windows.md
Created March 8, 2018 11:23
How to install PHP on Windows

How to install PHP on Windows

  1. Download PHP binaries: https://windows.php.net/download/
  2. Extract .zip to C:\php
  3. Rename C:\php\php.ini-production to php.ini
  4. On php.ini, find extension_dir and change the existing value to "C:\php\ext"
  5. On php.ini, enable the needed extensions. E.g. extension=php_curl.dll
  6. Edit the system environment variables by editing system variable Path and add C:\php
@fabiofdsantos
fabiofdsantos / PrestaShop1.7-Nginx.conf
Created March 3, 2018 20:04
Nginx configuration for PrestaShop 1.7 (ready for CloudFlare usage)
# Replace _WEBSITE.COM_ with YOUR_DOMAIN.TLD
# Replace _ADMIN_FOLDER_ with YOUR_ADMIN_FOLDER
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
server_name 127.0.0.1 _WEBSITE.com_ www._WEBSITE.com_;