Skip to content

Instantly share code, notes, and snippets.

{% capture replace1 %}{{ email.new_html|replace:'[code]',' <pre style="font-family:monospace; padding: 8px">'}}{% endcapture %}
{% capture replace2 %}{{ replace1|replace:'[/code]','</pre><p>' }}{% endcapture %}
{% capture replace3 %}{{ replace2|replace:'[i]','<i>'}}{% endcapture %}
{% capture replace4 %}{{ replace3|replace:'[/i]','</i>'}}{% endcapture %}
{% capture replace5 %}{{ replace4|replace:'[b]','<strong>'}}{% endcapture %}
{% capture replace6 %}{{ replace5|replace:'[/b]','</strong>'}}{% endcapture %}
{% capture replace7 %}{{ replace6|replace:'[red]','<font color="red">'}}{% endcapture %}
{% capture replace8 %}{{ replace7|replace:'[/red]','</font>'}}{% endcapture %}
{% capture replace9 %}{{ replace8|replace:'[blue]','<font color="blue">'}}{% endcapture %}
{% capture replace10 %}{{ replace9|replace:'[/blue]','</font>'}}{% endcapture %}
@DeskSupport
DeskSupport / SalesForce Widget.htm
Created August 28, 2011 09:17
SalesForce Widget
<div>
{{widget.salesforce.body}}
</div>
@DeskSupport
DeskSupport / gist:1176488
Created August 28, 2011 09:55
SalesForce Widget Styling
<style>
.salesforce_app_container {
display:inline-block;
width: 100%;
margin:0px;
padding: 0px;
}
.salesforce_app_container h3:first-child {
background: #1797c0;
@DeskSupport
DeskSupport / Instructions
Created October 18, 2011 20:39
QNA 18th QNA Modifications
1. UPDATES TO HEADER SECTION:
Copy the Updates to Header Section CSS to the end of the main <style> block of the Advanced Mode Template editor. You will insert this new CSS after:
#gs_search_title h5 {
font-size:20px;
border-bottom:1px solid #DDDDDD;
margin:0 0 20px;
padding:0 0 20px;
}
@DeskSupport
DeskSupport / HTML Body
Created October 27, 2011 00:56
GMail Style Template
{% assign emails = case.emails %}
{% assign threadlength = emails.size|minus:1 %}
{% for email in emails reversed %}
{% if forloop.first %}
{{email.new_html}}
{% if email.agent %}
{% if email.agent.signature %}
<p>--<br />
<div style="margin-top:10px;">
{{email.agent.signature | newline_to_br}}
{% assign _kb_topic_ids = '89110,89111,89112,89113,89114,89115,89116,89117,89118,89119,89120,89121,89122' %}

@DeskSupport
DeskSupport / gist:1609752
Created January 14, 2012 01:25
Import Customer CSV
=begin
This file will look for a CSV file named "customers.csv" in the same directory as this file.
The format of the CSV file should be Email Address,Name,Phone Number.
All fields are required and the email address must be formatted correctly.
The email address must be unique on your Assistly system or user creation will fail.
If you do not have data for the name and phone number fields, pass in a placeholder such as UNKNOWN.
There should be no spaces between columns... just commas.
The first row should NOT have column names. It should be the first row of the data to import.
A logfile named "create_customers_output.csv" will be generated in the same directory as this file.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Assistly Status</title>
<link rel="icon" type="image/vnd.microsoft.icon" href="http://www.desk.com/favicon.ico">
<link rel="icon" type="image/png" href="http://webassets.assistly.com/images/favicon.png">
<link rel="alternate" type="application/rss+xml" title="Expect Wow » Feed" href="http://www.desk.com/blog/feed/">
<link rel="alternate" type="application/rss+xml" title="Expect Wow » Comments Feed" href="http://www.desk.com/blog/comments/feed/">
{% assign emails = case.emails %}
{% assign threadlength = emails.size|minus:1 %}
{% for email in emails reversed %}
{% if forloop.first %}
{{email.new_html}}
{% if email.agent %}
{% if email.agent.signature %}
<div style="color: #222; font-family: ''Lucida Grande'', Helvetica, Arial, Verdana, sans-serif; font-size:12px; width:800px;">
<div style="color: #ff0000; margin: 0px 0px 10px 10px;">
Please type your reply at the top of the email...
</div>
<div style="border-bottom: dotted 2px #bbb; margin:0px 0px 15px 10px;"></div>