Skip to content

Instantly share code, notes, and snippets.

View alancpazetto's full-sized avatar
🏋️
Front-End @ Stone Co.

Alan Pazetto alancpazetto

🏋️
Front-End @ Stone Co.
View GitHub Profile
@alancpazetto
alancpazetto / _verify-repair-permissions-disk.md
Created May 3, 2017 21:54 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@alancpazetto
alancpazetto / main.js
Last active October 30, 2017 21:49
Create and Use an Gallery Plugin in WP
var owlBannerCarousel = $('.carousel-brands').owlCarousel({
scrollPerPage : true,
navigation: true,
dots : false,
pagination: true,
touchDrag: true,
mouseDrag: true,
margin: 0,
loop: true,
@alancpazetto
alancpazetto / add-woocommerce-product.php
Created November 23, 2017 13:42 — forked from Yame-/add-woocommerce-product.php
Adding a WooCommerce product programmatically.
<?php
$args = array(
'post_author' => 1,
'post_content' => '',
'post_status' => "draft", // (Draft | Pending | Publish)
'post_title' => '',
'post_parent' => '',
'post_type' => "product"
);
@alancpazetto
alancpazetto / woocommerce-custom-cart-item-data.php
Created November 24, 2017 19:45 — forked from RadGH/woocommerce-custom-cart-item-data.php
Get and set custom cart item/product information prior to WooCommerce checkout, and carry those valus over to Order Item Metadata.
<?php
// UPDATE: Stefan from Stack Overflow has explained a better way to handle cart item data.
// See http://stackoverflow.com/a/32327810/470480
// ----------------------
/*
Instructions:
@alancpazetto
alancpazetto / remove blank lines regex.md
Created February 22, 2018 14:09 — forked from fomightez/remove blank lines regex.md
remove all blank lines using regular expressions
function isChatMessage(message) {
if (message.__x_isSentByMe) {
return false;
}
if (message.__x_isNotification) {
return false;
}
if (!message.__x_isUserCreatedType) {
return false;
}
@alancpazetto
alancpazetto / solucao.txt
Created May 15, 2018 19:13
Problema com caracter invisivel ou ETX
Pra documentar. Aconteceu hoje comigo aquele erro de caractere invisível, uma possível causa é copiar o texto do photoshop e colar no editor de texto.
Comigo funcionou jogar no Google o texto e atualizar a página, todo o texto depois do caractere quebrado não apareceu.
@alancpazetto
alancpazetto / index.js
Created August 3, 2018 19:34
Machine Learning JS
const fs = require('fs-extra');
const KNN = require('ml-knn');
const moment = require('moment');
const { GaussianNB, MultinomialNB } = require('ml-naivebayes');
const { Matrix } = require('ml-matrix');
const { DecisionTreeClassifier } = require('ml-cart');

Juros LIS / Cheque especial Itaú

Juros ao mês: 11,95%
Juros ao dia: 0,3754%

Conta de juros composto

@alancpazetto
alancpazetto / tone.html
Created August 7, 2018 20:09
Gerar som JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>