Skip to content

Instantly share code, notes, and snippets.

View pejantantangguh's full-sized avatar
🎯

Herman Ng pejantantangguh

🎯
View GitHub Profile
@pejantantangguh
pejantantangguh / Useful.txt
Created November 23, 2020 21:07
Useful links and article
#ZOHO Deluge
## Update associated Deals when Account is modified
- https://www.cubeyogi.com/Zoho%20Knowledge%20Base/Zoho%20CRM%20Knowledge%20Base/2020/Q-134/update-associated-deals-when-account-is-modified
@pejantantangguh
pejantantangguh / ContactForm.js
Created August 16, 2020 23:57
Formik Reset Form
<Formik
initialValues={initialValues}
validationSchema={validationSchema}
validateOnBlur={false}
validateOnChange={false}
onSubmit={async (values, { resetForm }) => {
await onSubmit(values)
resetForm()
}}
@pejantantangguh
pejantantangguh / ContactForm.js
Last active August 16, 2020 23:59
Twilio(Sendgrid) with Serverless integration using Formik
import React, { Component } from 'react'
import {Button, FormControl, InputLabel, Input, Box } from '@material-ui/core';
import Alert from '@material-ui/lab/Alert';
import { useFormik } from 'formik';
import * as Yup from 'yup';
const twilioURL = 'your twilio Function URL';
const zapierHook = 'Zapier Hook URL';
// To Clear form after we submit!
@pejantantangguh
pejantantangguh / functions.php
Created March 19, 2020 04:43
Update action woocommerce
// How to change woocommece product title
remove_action('woocommerce_shop_loop_item_title','woocommerce_template_loop_product_title');
function update_inv_art_title(){
echo '<h3 class="h6 text-uppercase mb-1">' . get_the_title() . '</h3>';
}
add_action('invictus_art_loop_item_title', 'update_inv_art_title');
@pejantantangguh
pejantantangguh / calc.html
Created September 16, 2019 06:39
Calculator
<!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>
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@pejantantangguh
pejantantangguh / importmap.sql
Created September 5, 2019 22:40
Update Row in Smart freight SQL
// Windows -< SQL Server 2014 Management
select * from importfieldmapping
select * from importfieldmapping where sourcefield = 'column ae'
update importfieldmapping set sourcefield = 'Column AE' where sourcefield = 'column ag'
@pejantantangguh
pejantantangguh / Litespeed setup
Created July 4, 2019 08:30
Litespeed optimisation
https://wpjohnny.com/litespeed-cache-wordpress-plugin-unofficial-guide/
@pejantantangguh
pejantantangguh / fbpixels.js
Last active June 30, 2019 21:58
FB Pixels customisation
https://support.google.com/tagmanager/forum/AAAAnP_FwdIRXDmZQbTITU/?hl=en&gpf=d/topic/tag-manager/RXDmZQbTITU
https://help.aitarget.com/hc/en-us/articles/228924248-How-do-I-install-the-Facebook-pixel-with-Google-Tag-Manager-
// https://dev.to/claudiodavi/reducing-vscode-memory-consumption-527k?utm_source=digest_mailer&utm_medium=email&utm_campaign=digest_email
"telemetry.enableTelemetry": false
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/.vscode": true,
"**/__pycache__": true,
"**/.pytest_cache": true,