Skip to content

Instantly share code, notes, and snippets.

View JoseCage's full-sized avatar
:octocat:
Opensourcing

José Cage JoseCage

:octocat:
Opensourcing
View GitHub Profile
@JoseCage
JoseCage / .gitconfig
Created January 13, 2018 22:07 — forked from mikaelhadler/.gitconfig
Alias graph for git cli : ]
[alias]
graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
@JoseCage
JoseCage / import.sh
Created December 15, 2017 22:53
Import bd dentro do container
#!/usr/bin/env bash
mysql --verbose -u root -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE < /tmp/db/db.sql
@JoseCage
JoseCage / export.sh
Created December 15, 2017 22:50
Script para exportar o bd remoto
#!/usr/bin/env bash
sudo chown -R $USER ../db
#Credenciais do Banco da Amazon
echo 'insira o endereco do servidor:'
read s
echo 'insira o usuario:'
read u
echo 'insira a senha:'
read p
echo 'insira o nome do banco:'
@JoseCage
JoseCage / UuidModel.php
Created November 29, 2017 23:30 — forked from danb-humaan/UuidModel.php
Trait for implementing UUIDs in Laravel models
<?php
namespace App\Traits;
use Rhumsaa\Uuid\Uuid;
use Illuminate\Database\Eloquent\ModelNotFoundException;
/**
* Trait UuidModel
* @package App\Traits
@JoseCage
JoseCage / VS Code.md
Created November 7, 2017 20:03 — forked from paulofreitas/VS Code.md
My Visual Studio Code setup
@JoseCage
JoseCage / README-Template.md
Created May 18, 2017 20:57 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

<?php
namespace App\Http\Middleware;
class HandleCorsMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
@JoseCage
JoseCage / Dockerfile
Created May 12, 2017 20:38 — forked from mjason/Dockerfile
build phoenix in docker
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y git wget curl build-essential
RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && dpkg -i erlang-solutions_1.0_all.deb
RUN apt-get update
RUN apt-get install erlang -y
RUN apt-get install -y elixir
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@JoseCage
JoseCage / .htaccess
Created April 23, 2017 23:56 — forked from RafaelFunchal/.htaccess
Exclude the files ajax, upload and WP CRON scripts from authentication
# Exclude the files ajax, upload and WP CRON scripts from authentication
<FilesMatch "(admin-ajax\.php|media-upload\.php|async-upload\.php|wp-cron\.php|xmlrpc\.php)$">
Order allow,deny
Allow from all
Satisfy any
</FilesMatch>