Skip to content

Instantly share code, notes, and snippets.

View alcir-junior-caju's full-sized avatar

Alcir Junior alcir-junior-caju

View GitHub Profile
@alcir-junior-caju
alcir-junior-caju / gist:0e521c633a4e8ab360dd89f7a740ba17
Last active January 9, 2024 19:37
Download Image external Upload
fetch(url)
.then(response => response.blob())
.then(blob => {
const file = new File([blob], name, { type: 'image/*' });
dispatch({
type: 'SET_IMAGE',
payload: {
...data,
imageUrl: url,
image: file,
@alcir-junior-caju
alcir-junior-caju / account.integration.spec.ts
Last active February 1, 2023 21:29
Setup Tests Strapi with Typescript
import request from 'supertest';
import { describe, beforeAll, afterAll, it, expect } from '@jest/globals';
import { setupStrapi, stopStrapi } from '../config/strapi';
import {
account,
createPermissions,
createRoles,
createUser
@alcir-junior-caju
alcir-junior-caju / cloudSettings
Created August 22, 2020 17:15
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-22T17:15:24.995Z","extensionVersion":"v3.4.3"}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCouponsTable extends Migration
{
/**
* Run the migrations.
@alcir-junior-caju
alcir-junior-caju / docker-compose.yml
Last active November 8, 2019 12:40
Criar versões para PHP laradock
# em docker-compose.yml usar o código para novas pastas do fpm
### PHP-FPM ##############################################
php-fpm:
build:
context: ./php-fpm
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
@alcir-junior-caju
alcir-junior-caju / README-Template.md
Created October 17, 2019 18:48 — 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

{
"type": "collective",
"content": [
{
"title": "Título",
"description": "Descrição",
"members": [
{
"photo": "user-1.jpg",
"name": "Nome"
<?php
namespace App\Widgets;
use App\Post;
use Illuminate\Support\Str;
use TCG\Voyager\Widgets\BaseDimmer;
use Illuminate\Support\Facades\Auth;
class Posts extends BaseDimmer
@alcir-junior-caju
alcir-junior-caju / themosis.sh
Created February 17, 2019 18:31
Script Install Themosis
#!/bin/bash
# Params
dir=${1} # Name Project Dir
version=${2} # Version Themosis 2.0-beta3
# Change your Params
user='root'
pass='root'
db='mysql'
<?php
namespace TrustTattoo\Presenters;
use Illuminate\Support\Carbon;
class ContactPresenter extends BasePresenter
{
public function getFullName()
{