- Download Shrinkpdf.sh from http://alfredklomp.com/programming/shrinkpdf/
- Run the command as below:
sh shrinkpdf.sh inputfile.pdf outputfile.pdf 180 #180 is dots per inch.
| curl -i --location https://acme.my.salesforce.com/services/data/v50.0/sobjects/ContentVersion \ | |
| --header "Authorization: Bearer 00D051234564atA!abcdef" \ | |
| --form entity_content='{ "PathOnClient": "Statement.pdf" };type=application/json' \ | |
| --form VersionData="@Statement.pdf;type=application/octset-stream;" | |
| # Make sure that there is a file named `Statement.pdf` in the directory where this command is run from. |
sh shrinkpdf.sh inputfile.pdf outputfile.pdf 180 #180 is dots per inch.
FROM ubuntu
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
RUN apt-get update
RUN apt-get install -y sudo
| #!/bin/bash | |
| FEED_ITEM_TYPES=("ContentPost" "TextPost" "ActivityEvent" "AdvancedTextPost" "AnnouncementPost" "ApprovalPost" "BasicTemplateFeedItem" "CanvasPost" "CollaborationGroupCreated" "CollaborationGroupUnarchived" "ContentPost" "CreatedRecordEvent" "DashboardComponentAlert" "DashboardComponentSnapshot" "LinkPost" "PollPost" "ProfileSkillPost" "QuestionPost" "ReplyPost" "RypplePost" "TextPost" "TrackedChange" "UserStatus" "AttachArticleEvent" "CallLogPost" "CaseCommentPost" "ChangeStatusPost" "ChatTranscriptPost" "EmailMessageEvent" "FacebookPost" "MilestoneEvent" "SocialPost") | |
| DATE_LOWER_BOUND="" | |
| DATE_BOUND_VALUES=("2011-12-31" "2012-12-31" "2013-12-31" "2014-12-31" "2015-12-31" "2016-12-31" "2017-12-31" "2018-12-31" "2019-12-31" "2020-12-31") | |
| for FEED_ITEM_TYPE in ${FEED_ITEM_TYPES[@]}; do | |
| TOTAL_COUNT=0 |
| #!/bin/bash | |
| sfdx force:data:soql:query --query="SELECT Id,NameSpacePrefix, DeveloperName, TableEnumOrId,Metadata FROM CustomField WHERE TableEnumOrId = '$1' and DeveloperName='$2'" --usetoolingapi --targetusername cxuat --json > temp.txt | |
| echo 'printing picklist values' | |
| cat temp.txt | jq '.result.records[0].Metadata.valueSet.valueSetDefinition.value[]' | jq '.valueName' | |
| echo '-------------------------' |
| cleanUpDirectory(){ | |
| if [ $# -lt 1 ]; then | |
| echo 1>&2 "$0: not enough arguments" | |
| return | |
| fi | |
| find -E $1 -type f -maxdepth 1 -regex '.*\.(jpg|png|csv|txt|jpeg|dmg|pdf)' -exec rm -i {} \; | |
| } | |
| find / -type f -name '*.py' 2>/dev/null -exec grep --color --extended-regexp --with-filename --regexp 'access_token,' {} \; | |
| find ../ -type f -regex '.*.js' -not -regex '.*node\_modules.*' -exec grep -EHni --color "\*\*\*" {} \; |
| StartDate=$(date -u +%Y-%m-%dT%H:%M:%S.000+0000) | |
| ExpirationDate=$(date -u -v+24H +%Y-%m-%dT%H:%M:%S.000+0000) | |
| #echo "StartDate=$StartDate ExpirationDate=$ExpirationDate" | |
| temp="StartDate=$StartDate ExpirationDate=$ExpirationDate" | |
| sfdx force:data:record:update -t -s TraceFlag -i <traceFlagIdGoesHere> -v $temp --targetusername=prod | |
| echo "Extended debug logs for Ramesh Ale" |
| #!/bin/bash | |
| prepare_wildcard_package (){ | |
| echo " <types>" >> package_temp.xml | |
| echo " <members>*</members>" >> package_temp.xml | |
| echo " <name>$1</name>" >> package_temp.xml | |
| echo " </types>" >> package_temp.xml | |
| } | |
| rm -f temp.txt |
| public static List<EmailMessage> prepareEmailMessageList(List<Account> accList){ | |
| List<EmailMessage> emailMsgList = new List<EmailMessage>(); | |
| EmailTemplate templateObj = [SELECT Id,Name,Subject,Body,HtmlValue,Markup FROM EmailTemplate WHERE Name = 'Statement Template' LIMIT 1]; | |
| for(Account accObj: accList){ | |
| EmailMessage emailMsgObj = new EmailMessage(); | |
| emailMsgObj.status = '3'; // email was sent | |
| emailMsgObj.relatedToId = accObj.Id; | |
| emailMsgObj.fromAddress = 'Billing.Support@acme.com'; // from address | |
| emailMsgObj.fromName = 'Billing Services'; // from name |
| import subprocess | |
| import os | |
| import shutil | |
| import xml.etree.ElementTree as ET | |
| objectName = 'SBQQ__ConfigurationRule__c' | |
| command = "sfdx force:schema:sobject:describe --sobjecttype=" + objectName + " --targetusername=TEST --json | jq '.result.fields[]' | jq '.name' | jq -s ." | |
| commandOutput = subprocess.check_output(command,shell=True) |