Skip to content

Instantly share code, notes, and snippets.

View odirleiborgert's full-sized avatar
💻
Working

Odirlei Borgert odirleiborgert

💻
Working
View GitHub Profile
@max10rogerio
max10rogerio / yup.locale.pt-br.js
Last active May 10, 2024 17:02
Translation of the main messages from the Yup library into the Pt-Br language.
/* eslint-disable */
// For more infos, see: https://github.com/jquense/yup/blob/master/src/locale.js
import { setLocale } from 'yup'
const translation = {
mixed: {
default: '${path} é inválido',
required: '${path} é um campo obrigatório',
oneOf: '${path} deve ser um dos seguintes valores: ${values}',
notOneOf: '${path} não pode ser um dos seguintes valores: ${values}',
@edilsoncichon
edilsoncichon / InputDate.vue
Last active April 16, 2018 12:21
Vue JS component for the user to enter the date. Day, month and year are separated into inputs, to avoid problems with browser compatibility.
<template>
<div>
<select v-model="day" :name="idDay" :id="idDay" :disabled="disabled">
<option value="">day</option>
<option v-for="n in 31" :value="n">{{ n++ }}</option>
</select>
<select v-model="month" :name="idMonth" :id="idMonth" :disabled="disabled">
<option value="">month</option>
<option v-for="(month, key) in months" :value="key+1">{{ month }}</option>
</select>
<style lang="sass" scoped>
.app {
position : relative;
width : 100vw;
height : 100vh;
margin : 0 !important;
}
.appbar {
position : absolute;

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@xthiago
xthiago / README.md
Created December 8, 2013 13:35 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@novasky-zz
novasky-zz / gist:7213002
Created October 29, 2013 11:30
Dynamic subdomains with cPanel and PHP
# Put * in Subdomains in cPanel to setup Wildcard
# Put this in .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([aA-zZ])$ subslug.php?username=$1
RewriteCond %{HTTP_HOST} ^(^.*)\.yourdomain.com
RewriteRule (.*) subslug.php?username=%1
@novasky-zz
novasky-zz / gist:6933419
Created October 11, 2013 11:51
Para corrigir o problema com espaço em branco no FckEditor
//Arquivo shared/libs/fckconfig.js
FCKConfig.FillEmptyBlocks = false
@novasky-zz
novasky-zz / gist:6885187
Created October 8, 2013 14:03
Habilitar Rewrite Mode no linux.
sudo a2enmod rewrite
sudo service apache2 restart
@rafaelgou
rafaelgou / StringUtil.php
Last active December 22, 2015 05:18
PHP Slug generator class/method
/**
* Description of StringUtil
*
* @author <rafaelgou@gmail.com> Rafael Goulart
*/
class StringUtil {
/**
* Slugify a text and remove accents
*