Skip to content

Instantly share code, notes, and snippets.

View alex-oliveira's full-sized avatar

Alex Oliveira alex-oliveira

View GitHub Profile
ssh-keygen -t rsa -C "you@homestead"
# PHP
alias php='/opt/php56/bin/php'
alias composer='~/composer.phar'
export PATH="/opt/php56/bin:$PATH"
weinre --httpPort 8081 --boundHost -all-
$ sudo pico /etc/mysql/mysql.cnf
[mysqld]
federated
$ service mysql restart
@alex-oliveira
alex-oliveira / homestead.md
Last active April 20, 2017 19:22
Sharing Virtual Localhost

Starting Homestead

$ vagrant up

Sharing Main Homestead Host

$ vagrant share

@alex-oliveira
alex-oliveira / angular.md
Last active April 20, 2017 17:40
Notes about Angular

Create a project with preprocessor of css

ng new my-project --style=sass

ng new my-project --style=less

``

@alex-oliveira
alex-oliveira / vuejs.md
Last active May 16, 2017 20:26
Vue.JS 2

Init of project (Standalon + ESLint + Airbnb)

$ vue init webpack my-project

Init of node

$ cd my-project

INDEX.HTML

<script src="http://192.168.2.26:8088/target/target-script-min.js#anonymous"></script>

LOCAL PROMPT

weinre --httpPort 8088 --boundHost -all-
@alex-oliveira
alex-oliveira / database.js
Last active December 16, 2017 13:08
DATABASE JS TOOLS
'use strict';
angular.module('shared')
.factory('$database', ['$q', '$migrations', 'DEBUG_DB',
function ($q, $migrations, DEBUG_DB) {
var Factory = function (config) {
this.data = {};
this.data.name = 'db';
this.data.description = Factory.name;
@alex-oliveira
alex-oliveira / APP VERSION.md
Last active May 10, 2018 18:19
APP VERSION

APP VERSION

Códigos para forçar o frontend a se atualizar automáticamente quando uma nova versão está disponível.

Prerequisitos:

  • Frontend feito com AngularJS e backend feito com Laravel
  • Frontend e backend que compartilham o mesmo nome de versão
  • Procedimento externo que atualize o nome da versão atual

LARAVEL API CONFIGS