Skip to content

Instantly share code, notes, and snippets.

View marcusmotill's full-sized avatar
👋

Marcus Motill marcusmotill

👋
View GitHub Profile
@marcusmotill
marcusmotill / init_output.md
Last active February 23, 2023 14:33
init output pipeline noti data
@marcusmotill
marcusmotill / sortem.js
Created November 17, 2022 19:09
sort two arrays
// input is two ascending sorted arrays
// output is the product of the two arrays sorted ascending
// inputs
const input1 = [1, 2, 3, 4, 99];
const input2 = [8, 10, 99, 101, 102];
// define variables needed in loop
let output = [];
let pointer1 = 0;
--- a/forecast_api/storage/postgres_connection.py
+++ b/forecast_api/storage/postgres_connection.py
@@ -1,7 +1,7 @@
import contextlib
import logging
-import psycopg2
+import pg8000.dbapi
logger = logging.getLogger(__name__)
@marcusmotill
marcusmotill / sourceContentTypeByTeam.es
Created July 14, 2022 16:26
Query for seeing how many activity defs exist on a team for a given sourceContent type
{
"query": {
"bool": {
"must": [
{
"has_parent": {
"parent_type": "globalDefinition",
"score": true,
"query": {
"term": {
@marcusmotill
marcusmotill / BitmapUtils.kt
Created March 12, 2016 18:36
Image compression for Android in Kotlin
class BitmapUtils {
companion object
}
fun BitmapUtils.Companion.getCompressedImage(pathName: String, scalingLogic: ImageView.ScaleType): String {
val options = BitmapFactory.Options()
options.inJustDecodeBounds = true
BitmapFactory.decodeFile(pathName, options)
options.inJustDecodeBounds = false
val dstWidth: Double = ((options.outWidth.toDouble() / (options.outWidth.toDouble() * options.outHeight.toDouble())) * 1000) * options.outWidth.toDouble()
OpportunityLineItem ContractLineItem WorkOrderLineItem
ConnectionReceivedId AssetId Address
ConnectionSentId Description AssetId
CurrencyIsoCode Discount City
Description EndDate Country
Discount LastReferencedDate CurrencyIsoCode
HasQuantitySchedule LastViewedDate Description
HasRevenueSchedule LineItemNumber Discount
HasSchedule ListPrice Duration

Opportunity Close Date

{"##RANGE##":{"opportunity.closeDate":{"lte":"now-15M/d"}}}

Actions

Action Life Cycle

Action Create, then...

  • User (click) Dismiss → Action state = dismiss, user will never see that action again
    • Dismiss event created
  • User (click) Complete → Action state = complete, user will never see that action again
    • Complete event created
  • Action definition indicates action is deprecated -> Action state = deprecate, user will never see that action again unless un-deprecated
  • Action definition indicates action is disabled -> Action state = deprecate, user will never see that action again unless enabled
//settings