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
# HTTP Application
server {
# Application Path
root /path/to/app/public/path;
# Index Application File
index index.php;
@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 / ubuntu-install-nodejs-npm.sh
Created August 7, 2017 19:44 — forked from kolosek/ubuntu-install-nodejs-npm.sh
Install node.js version 6.x Ubuntu 16.04
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
echo "Installing NodeJS 6.x"
sudo apt-get install nodejs
echo "Install webpack globally"
sudo npm install webpack -g
echo "Install nightwatch globally"
sudo npm install webpack -g
@cpereiraweb
cpereiraweb / Inflector.php
Created February 8, 2021 23:31 — forked from pedroufv/Inflector.php
Pluralize pt-br
<?php
namespace Laravel\Support\Services;
class Inflector
{
/**
* @var array
*/
public static $rules = [
@cpereiraweb
cpereiraweb / AppNavigationMenu.php
Created June 11, 2021 19:22 — forked from rosswintle/AppNavigationMenu.php
Laravel Jetstream Livewire Navigation Menu
<?php
/**
* This class extends the base NavigationClass provided by Jetstream.
* Note that the base class includes the navigation-menu.blade.php
*/
namespace App\Http\Livewire;
class AppNavigationMenu extends \Laravel\Jetstream\Http\Livewire\NavigationMenu
{
@cpereiraweb
cpereiraweb / deploy.sh
Created February 14, 2022 23:09 — forked from cagartner/deploy.sh
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@cpereiraweb
cpereiraweb / VSCode
Created March 10, 2022 01:01 — forked from r2luna/VSCode
VSCode Settings
alefragnani.project-manager
amiralizadeh9480.laravel-extra-intellisense
antfu.icons-carbon
austenc.laravel-blade-spacer
bmewburn.vscode-intelephense-client
bradlc.vscode-tailwindcss
calebporzio.better-keybindings
calebporzio.better-phpunit
ceciljacob.code-plus-theme
cjhowe7.laravel-blade
@cpereiraweb
cpereiraweb / Aliases
Created March 10, 2022 01:01 — forked from r2luna/Aliases
# -------------------------------------------------------------------------------------------
# ALIASES
# -------------------------------------------------------------------------------------------
# Brew
alias bsa='brew services start'
alias bs='brew services'
alias bso='brew services stop'
# Git
<?php
namespace App\Forms\Components;
use Closure;
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Components\Field;
class DropInAction extends Field
{