Skip to content

Instantly share code, notes, and snippets.

View eliasfaical's full-sized avatar
🏠
Working from home

Elias Faiçal eliasfaical

🏠
Working from home
View GitHub Profile
@eliasfaical
eliasfaical / gulpfile.js
Created July 10, 2019 13:29 — forked from jasonyingling/gulpfile.js
A simple gulpfile setup for modern JavaScript and SASS
const { src, dest, watch } = require('gulp');
const sass = require('gulp-sass');
const minifyCSS = require('gulp-csso');
const babel = require('gulp-babel');
const concat = require('gulp-concat');
const browserSync = require('browser-sync').create();
function css() {
return src('./sass/*.scss', { sourcemaps: true })
.pipe(sass())
@eliasfaical
eliasfaical / webstoemp-gulpfile.js
Created April 22, 2019 13:09 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@eliasfaical
eliasfaical / Instructions: How to enqueue the CSS in your theme
Created January 30, 2019 19:07 — forked from gugaalves/custom-login-styles.css
WordPress - Customizing Login, Register and Lost Password pages
STEPS:
1 - If the theme was not developd by you, first create a child theme (How to create a child theme? Read at https://codex.wordpress.org/Child_Themes) or else modifications will be lost when updating your theme.
2 - Add the following CSS file in your theme/child theme (better if you create a folder to add CSS there).
3 - Add the following snippet in your functions.php file:
function tpw_enqueue_custom_admin_style() {
echo '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/css/admin/custom-login-styles.css" />';
}
@eliasfaical
eliasfaical / iis-web.config
Created November 2, 2018 14:10 — forked from Toddses/iis-web.config
Example web.config for WordPress on IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
<rewrite>
@eliasfaical
eliasfaical / ACF-img-size
Created June 13, 2018 15:11 — forked from crondeau/ACF-img-size
Display different image size using ACF
//To display an image using ACF, one would set the image custom field to image url and call the img as follows:
<?php if( get_field( 'field_name' ) ): ?>
<?php while( has_sub_field( 'field_name' ) ): ?>
<img src="<?php the_sub_field( 'image' ); ?>" alt="">
<?php endwhile; ?>
@eliasfaical
eliasfaical / gist:edd425ae40af1bc5e615d3077b54d712
Created January 25, 2018 18:38 — forked from danilowm/gist:bb6f216dd018ae68a803
web.config wordpress em hospedagem Windows
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {
@eliasfaical
eliasfaical / git.md
Created June 2, 2017 21:05 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@eliasfaical
eliasfaical / 01-gulpfile.js
Last active May 24, 2017 18:56 — forked from markgoodyear/01-gulpfile.js
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* install task gulp
* $ npm install -g browser-sync
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
@eliasfaical
eliasfaical / template_amp.html
Created December 12, 2016 11:52 — forked from adrianoalmeida7/template_amp.html
HTML Básico para AMP
<!doctype html>
<html amp lang="pt-BR">
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<link rel="canonical" href="http://caminho_do_arquivo_original/arquivo.html">
<title>Página compatvel com AMP</title>
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html" />
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{