Skip to content

Instantly share code, notes, and snippets.

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

Yojance Rabelo yojance

🏠
Working from home
View GitHub Profile
@yojance
yojance / address.create.201.txt
Last active May 25, 2019 15:03
WP ActiveCampaign: Addresses
(
[code] => 201
[message] => Created
[body] => Array
(
[raw] => {"address":{"address1":" 123 Success St.","address2":"Suite 1337","city":"Tampa","state":"FL","zip":"12345","country":"US","district":"No District","companyName":"WP Superstar","isDefault":1,"links":{"addressGroup":"https:\/\/1558186228.api-us1.com\/api\/3\/addresses\/2\/addressGroup","addressList":"https:\/\/1558186228.api-us1.com\/api\/3\/addresses\/2\/addressList","forms":"https:\/\/1558186228.api-us1.com\/api\/3\/addresses\/2\/forms"},"id":"2"}}
[json] => stdClass Object
(
[address] => stdClass Object
(
@yojance
yojance / create.200.json
Last active May 20, 2019 02:36
WP ActiveCampaign: Tags
{
"tag":{
"tag":"Pro Member",
"description":"Pro Membership Level",
"tagType":"contact",
"cdate":"2019-05-19T21:21:45-05:00",
"links":{
"contactGoalTags":"https:\/\/1558186228.api-us1.com\/api\/3\/tags\/4\/contactGoalTags"
},
"id":"4"
@yojance
yojance / contacts.create.json
Last active May 18, 2019 19:40
WP ActiveCampaign: Contact Responses
{
"contact":{
"email":"johndoe@wpsuperstar.com",
"phone":"1113335555",
"firstName":"John",
"lastName":"Doe",
"cdate":"2019-05-18T14:31:35-05:00",
"udate":"2019-05-18T14:31:35-05:00",
"orgid":"",
"orgname":"",
{
"data": {
"id": 9015,
"type": "course",
"title": "Memory & Storage: Accessories Basics",
"slug": "ktbeginner_memory_storage",
"excerpt": null,
"content": {
"raw": "Join RC Concepcion as he takes a deeper dive into the topic of memory cards and data storage. In this class he provides an overview of different types of memory cards, options to improve the transfer of data from your cards to your computer, and various types of portable and long term storage solutions.",
"rendered": "Join RC Concepcion as he takes a deeper dive into the topic of memory cards and data storage. In this class he provides an overview of different types of memory cards, options to improve the transfer of data from your cards to your computer, and various types of portable and long term storage solutions."
@yojance
yojance / type-download.json
Created February 22, 2019 14:57
Toolkit Download
{
"data": {
"id": 1868866,
"title": "Rick Sammon Life Lessons eBook",
"images": {
"100w": "https:\/\/members.kelbyone.com\/wp-content\/uploads\/2017\/12\/Gift10_RSammon_362x192-100x53.jpg",
"160w": "https:\/\/members.kelbyone.com\/wp-content\/uploads\/2017\/12\/Gift10_RSammon_362x192-160x85.jpg",
"250w": "https:\/\/members.kelbyone.com\/wp-content\/uploads\/2017\/12\/Gift10_RSammon_362x192-250x133.jpg",
"362w": "https:\/\/members.kelbyone.com\/wp-content\/uploads\/2017\/12\/Gift10_RSammon_362x192.jpg",
"full": "https:\/\/members.kelbyone.com\/wp-content\/uploads\/2017\/12\/Gift10_RSammon_362x192.jpg"
@yojance
yojance / functions.php
Created October 18, 2018 00:51
Speed Up Large WordPress & WooCommerce Website Back-End
<?php
add_filter( 'postmeta_form_limit', 'limit_postmeta_keys_to_zero', 10, 1 );
function limit_postmeta_keys_to_zero( $limit ) {
global $post;
// Only for these post types
$valid_post_types = array(
// WooCommerce Subscriptions
'shop_subscription',
// WooCommerce
'shop_order',
@yojance
yojance / gcharts.html
Created January 27, 2018 13:56
Google Charts
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Google Charts</title>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<?php
$data = array(
''
@yojance
yojance / number-increments.js
Created June 2, 2017 18:03
ReactJS: Number Increments
class Button extends React.Component {
state = { counter: 0 };
handleClick = () => {
this.setState( (prevState) => {
return {
counter: prevState.counter +1
}
})
};
@yojance
yojance / active.sql
Last active May 11, 2017 19:45
Subscription ID, Subscription status, Billing First Name, Billing Last Name, Billing Email, Product Title, Order Total, Order Tax
# Subscription ID, Subscription status, Billing First Name, Billing Last Name, Billing Email, Product Title, Order Total, Order Tax
SELECT
p.ID as 'Subscription ID',
p.post_status as 'Subscription Status',
pm1.meta_value as 'Billing First Name',
pm2.meta_value as 'Billing Last Name',
pm3.meta_value as 'Billing Email',
oitems.order_item_name as 'Product',
pm4.meta_value as 'Order Total',
@yojance
yojance / gist:aaee1a26ecd7e0c1027f7e378f2efae9
Created March 5, 2017 15:20
Log Data Submission Fields
[05-Mar-2017 10:19:43 America/New_York] Ajax: Formatted Data
[05-Mar-2017 10:19:43 America/New_York] Array
(
[action] => handle_log_workout
[fields] => Array
(
[distance-unit-of-measure] => m
[workout-id] => 2231
[action] => handle_log_workout
[log-activity-type] => cardio