Skip to content

Instantly share code, notes, and snippets.

View GabrielApG's full-sized avatar

Gabriel Gonçalves GabrielApG

View GitHub Profile
@GabrielApG
GabrielApG / oauth.js
Created October 3, 2018 14:34 — forked from srph/oauth.js
axios: interceptor which includes your oauth token in every request as an Authorization header
import axios from 'axios';
// You can use any cookie library or whatever
// library to access your client storage.
import cookie from 'cookie-machine';
axios.interceptors.request.use(function(config) {
const token = cookie.get(__TOKEN_KEY__);
if ( token != null ) {
config.headers.Authorization = `Bearer ${token}`;
@GabrielApG
GabrielApG / git-tag-delete-local-and-remote.sh
Created August 8, 2018 12:09 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@GabrielApG
GabrielApG / simple-vue-resource.js
Created June 28, 2018 20:22 — forked from driedtoast/simple-vue-resource.js
Quasar with vue resouce
// main.js
import Vue from 'vue'
import VueResource from 'vue-resource'
import Quasar from 'quasar'
import router from './router'
Vue.use(Quasar) // Install Quasar Framework
Vue.use(VueResource)
$ find ./vendor -name ".git" -exec rm -rf {} \;
.ui-datepicker {
background-color: #fff;
border: 1px solid #66AFE9;
border-radius: 4px;
box-shadow: 0 0 8px rgba(102,175,233,.6);
display: none;
margin-top: 4px;
padding: 10px;
width: 240px;
}
@GabrielApG
GabrielApG / ui.datepicker-pt-BR.js
Created June 14, 2018 12:05 — forked from Senhordim/ui.datepicker-pt-BR.js
Tradução datepicker pt-BR
/* Brazilian initialisation for the jQuery UI date picker plugin. */
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
jQuery(function($){
$.datepicker.regional['pt-BR'] = {
closeText: 'Fechar',
prevText: '<Anterior',
nextText: 'Próximo>',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
@GabrielApG
GabrielApG / deploy.sh
Created June 14, 2018 09:51 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down
# Pull the latest changes from the git repository
git pull origin master
# Install/update composer dependecies
@GabrielApG
GabrielApG / warning-remote-host
Created May 7, 2018 14:14 — forked from ataliba/warning-remote-host
Warning: Remote Host Identification Has Changed error and solution
Hello,
this a simple solution for this problem. If you want to access a host with your ssh and receive this error :
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
@GabrielApG
GabrielApG / media-query.css
Created April 5, 2018 19:41 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@GabrielApG
GabrielApG / git.md
Last active February 7, 2018 23:53 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda