This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require("gulp"); | |
const imagemin = require("gulp-imagemin"); | |
const newer = require("gulp-newer"); | |
const plumber = require("gulp-plumber"); | |
const notify = require("gulp-notify"); | |
// Optimize Images | |
function images() { | |
return gulp | |
.src("./assets/img/**/*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro | |
# | |
WP_OWNER=changeme # <-- wordpress owner | |
WP_GROUP=changeme # <-- wordpress group | |
WP_ROOT=/home/changeme # <-- wordpress root directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage | |
# 1 - Create a folder into any folder (like uploads, or year, or month) and put this script in there. | |
# 2 - Run "bash cleanup-unused-wordpress-uploads.sh" | |
currentPath=$(pwd) | |
echo "Input the crop size pattern" | |
echo ">> Sample: '150x150' " | |
read sizePattern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Docker WordPress-Bitnami image permissions | |
sudo chown -R /opt/bitnami/apps/wordpress/htdocs | |
sudo find /opt/bitnami/apps/wordpress/htdocs -type d -exec chmod 775 {} \; | |
sudo find /opt/bitnami/apps/wordpress/htdocs -type f -exec chmod 664 {} \; | |
sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name TinyERP - Remove CPF do cliente em NF em formato etiqueta | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @author https://github.com/brunomarks7 | |
// @match *://erp.tiny.com.br/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// ==/UserScript== | |
(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx | |
LABEL maintainer="[email protected]" | |
COPY /images /usr/share/nginx/html | |
RUN apt update && apt install -y curl | |
RUN curl -O https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.4.1-linux-x86-64.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const checkPhonepattern = phone => { | |
// checa se o telefone é fixo com começo entre 2 e 5 | |
// ou celular com 9 dig e começo entre 6 e 9 | |
if ( (/^(?:(55\d{2})|\d{2})[2-5]\d{7}$/.test(phone)) || (/^(?:(55\d{2})|\d{2})[6-9]\d{8}$/.test(phone))) { | |
return true; | |
}else { | |
return false; | |
} | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# insert above functions for debug | |
function debug_wp_scripts_on_queue() { | |
global $wp_scripts; | |
echo "<h2>Enqueued JS Scripts</h2><ul>"; | |
foreach( $wp_scripts->queue as $handle ) : | |
echo "<li>" . $handle . "</li>"; | |
endforeach; | |
echo "</ul>"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const messagebird = require('messagebird')(process.env.MESSAGEBIRD_API_KEY, null, ["ENABLE_CONVERSATIONSAPI_WHATSAPP_SANDBOX"]); | |
const urlTracker = tracking_code => { | |
if (tracking_code.slice(0, 2) == 'ME') { | |
return 'https://melhorrastreio.com.br/rastreio/'; | |
} | |
return 'https://www.linkcorreios.com.br/'; | |
} | |
const sendWhatsApp = async function(phone, templateName, params) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum update -y | |
amazon-linux-extras install docker -y | |
service docker start | |
usermod -a -G docker ec2-user | |
chkconfig docker on | |
yum install -y git | |
curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
docker-compose version |
OlderNewer