Skip to content

Instantly share code, notes, and snippets.


Claudio Pereira cpereiraweb

  • Rio de Janeiro, Brazil
View GitHub Profile
cpereiraweb / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
cpereiraweb / crm.conf
Created September 20, 2016 22:16
Laravel rodando em alias (url subdir) no Apache 2.4
View crm.conf
#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
View AppServiceProvider.php
namespace SnPortal\Providers;
use SnPortal\Models\Client;
use SnPortal\Observers\ClientObserver;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
cpereiraweb / clients.index.vue
Created November 6, 2016 17:30
Erro ao tentar utilizar o VeeValidate
View clients.index.vue
/** SnClients **/
import SnClientsTable from './table.vue'
import SnClientForm from './form.vue'
import moment from 'moment'
import bus from '../utils/events/bus'
export default {
cpereiraweb /
Created November 30, 2016 16:11
Erro de rota no Laravel 5.3
server {
listen 80;
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;
View site_do_nginx.conf
# HTTP Application
server {
# Application Path
root /path/to/app/public/path;
# Index Application File
index index.php;
View edit.blade.php
{{-- views/tickets/index.blade.php --}}
<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>( {{
View ClientObserver.php
* Created by PhpStorm.
* User: claudio
* Date: 01/11/16
* Time: 22:40
namespace SnPortal\Observers;
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)
View OpenWithSublimeText3.bat
@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 / social_data.skema
Created July 24, 2017 21:11
Social Data collected data
View social_data.skema