Skip to content

Instantly share code, notes, and snippets.

Avatar
😆

Igor C. de Paula IgorDePaula

😆
View GitHub Profile
@IgorDePaula
IgorDePaula / Checkbox.js
Created Sep 21, 2020
Checkbox com vue and tailwindcss
View Checkbox.js
const Checkbox = {
name: 'Checkbox',
template: '<div>' +
'<div class="input-text cursor-pointer flex h-10" @click="emit">' +
'<div class="h-4 w-4 rounded border-2 border-green-700 m-auto" :class="newClass">' +
'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3 fill-current text-white" v-if="checked" viewBox="0 0 20 20"><path d="M0 11l2-2 5 5L18 3l2 2L7 18z"/></svg>' +
'</div>' +
'<div class="self-center flex-1 px-1 pb-1" v-html="label"></div>' +
'</div>' +
'</div>',
@IgorDePaula
IgorDePaula / RadioButton.js
Last active Sep 18, 2020
Radio Button puro em vuejs e tailwindcss (classe input-text é um conjunto add com ```@apply``` do tailwindcss)
View RadioButton.js
const RadioButton = {
name: 'RadioButton',
template: '<div>' +
'<div class="input-text cursor-pointer flex h-10" @click="$emit(\'input\', valor)">' +
'<div class="h-4 w-4 rounded-full border-2 border-green-700 m-auto" :class="newClass">' +
'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3 fill-current text-white" v-if="checked == valor" viewBox="0 0 20 20"><path d="M0 11l2-2 5 5L18 3l2 2L7 18z"/></svg>' +
'</div>' +
'<div class="self-center flex-1 px-2 pb-1">{{label}}</div>' +
'</div>',
computed: {
@IgorDePaula
IgorDePaula / Dockerfile
Created Aug 20, 2020
docker and docker-compose laravel app
View Dockerfile
FROM composer:latest AS composer
FROM php:7.3-apache
RUN apt-get update && apt-get install -y \
unzip \
git \
zip \
nano \
curl \
zlib1g-dev \
View main.go
package main
import (
"errors"
"flag"
"fmt"
"os"
)
func NewGreetCommand() *GreetCommand {
@IgorDePaula
IgorDePaula / main.go
Created Jul 31, 2020
go parse execution flags
View main.go
package main
import (
"flag"
"fmt"
"os"
)
type Car struct {
Model []string
@IgorDePaula
IgorDePaula / deploy.yml
Created Jul 27, 2020
github action deploy
View deploy.yml
name: Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
View go-workflow.yml
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
View main.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
View AddCard.js
import React, {Component, Context, useState, useContext} from 'react';
import {
ActivityIndicator,
KeyboardAvoidingView,
ScrollView,
StyleSheet,
Text,
View,
} from 'react-native';
import {Button, TextInput} from 'react-native-paper';
@IgorDePaula
IgorDePaula / main.go
Created Jul 22, 2020
Go lendo arquivo yml
View main.go
package main
import (
"fmt"
"github.com/goccy/go-yaml"
"io/ioutil"
"log"
)
type conf struct {
Hits int64 `yaml:"hits"`
Time int64 `yaml:"time"`
You can’t perform that action at this time.