This file contains hidden or 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
/** | |
* Calculates the required stem spacer changes and resulting reach changes for a bicycle stem adjustment. | |
* Uses trigonometric relationships in a right triangle formed by: | |
* - The vertical change (stackDelta) as the opposite side | |
* - The horizontal change (reachDelta) as the adjacent side | |
* - The spacer change (spacersDelta) as the hypotenuse | |
* | |
* Mathematical relationships used: | |
* - sin(headAngle) = stackDelta/spacersDelta | |
* - cos(headAngle) = |reachDelta|/spacersDelta |
This file contains hidden or 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
$client->users->create([ | |
"user_id" => "161661", | |
"custom_attributes" => [ | |
"my_custom_attribute" => "foo123" | |
] | |
]); | |
$client->companies->create([ | |
"name" => "foocorp", "id" => "135", | |
"custom_attributes" => [ |
This file contains hidden or 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
my_user_id = '' # user_id of the person you are sending a message to | |
my_admin_id = '' # admin_id of the admin sending the message, and doing the re-assign | |
my_team_id = '' # admin_id of the team you are assigning to | |
# sends a message | |
message = intercom.messages.create({ | |
message_type: 'email', | |
subject: 'Hey there', | |
body: "What's up :)", | |
template: "plain", # or "personal", |
This file contains hidden or 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 | |
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); | |
function my_theme_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
} | |
?> |
This file contains hidden or 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 | |
function add_this_script_footer(){ ?> | |
<script> | |
// intercomSettings must already be defined at this point | |
intercomSettings.attribute1 = "value1"; | |
intercomSettings.attribute2 = "value2"; | |
Intercom('update'); | |
</script> |