Skip to content

Instantly share code, notes, and snippets.

View cpereiraweb's full-sized avatar

Claudio Pereira cpereiraweb

  • Rio de Janeiro, Brazil
View GitHub Profile
@cpereiraweb
cpereiraweb / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cpereiraweb
cpereiraweb / crm.conf
Created September 20, 2016 22:16
Laravel rodando em alias (url subdir) no Apache 2.4
#1) crie os alias para o subdir
Alias /crm/ /srv/www/portais/crm/public/
Alias /crm /srv/www/portais/crm/public/
#2) defina as permissões do diretório físico
<Directory "/srv/www/portais/crm/public/">
AllowOverride All
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
Require all granted
</Directory>
<?php
namespace SnPortal\Providers;
use SnPortal\Models\Client;
use SnPortal\Observers\ClientObserver;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@cpereiraweb
cpereiraweb / clients.index.vue
Created November 6, 2016 17:30
Erro ao tentar utilizar o VeeValidate
/** SnClients **/
<script>
import SnClientsTable from './table.vue'
import SnClientForm from './form.vue'
import moment from 'moment'
import bus from '../utils/events/bus'
export default {
@cpereiraweb
cpereiraweb / pusherdemo.dev
Created November 30, 2016 16:11
Erro de rota no Laravel 5.3
server {
listen 80;
server_name pusherdemo.dev;
root /home/claudio/Projetos/pusherdemo/public/;
index index.php index.html index.htm index.nginx-debian.html;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string =404;
# HTTP Application
server {
# Application Path
root /path/to/app/public/path;
# Index Application File
index index.php;
{{-- views/tickets/index.blade.php --}}
@extends('layouts.adminlte')
@section('content')
<section class="invoice">
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<i class="fa fa-ticket"></i> {{ $ticket->client->nome }} / {{ $ticket->location->nome }}
<small class="pull-right">Aberta em: {{ $ticket->data_abertura->format('d/m/Y H:i') }} por {{ $channels[$ticket->canal] }} <i>( {{
<?php
/**
* Created by PhpStorm.
* User: claudio
* Date: 01/11/16
* Time: 22:40
*/
namespace SnPortal\Observers;
@cpereiraweb
cpereiraweb / OpenWithSublimeText3.bat
Created July 2, 2017 16:42 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@cpereiraweb
cpereiraweb / social_data.skema
Created July 24, 2017 21:11
Social Data collected data
[{"name":"social_data","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":false,"softdelete":false,"column":[{"name":"user_id","type":"integer","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":true,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c31","order":0},{"name":"email","type":"string","length":"255","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":true,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c39","order":1},{"name":"social_network","type":"string","length":"100","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c47","order":2},{"name":"meta_data","type":"text","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visibl