No longer needed! https://twitter.com/trello/status/893213868322902017
This file contains 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
function get-queueLength(){ | |
try { | |
$s = (New-Object net.webclient).DownloadString('http://localhost:56785/stats.json') | |
} | |
catch { | |
return "queue length unavailable" | |
} | |
$queueLength = $s -split (',') | foreach{if ($_ | select-string "queueLength" -quiet){ ($_ -split ":")[1]}} | |
return $queueLength | |
} |
This file contains 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
# Uses WASP from http://wasp.codeplex.com for automating the control of Windows in Powershell. | |
# The purpose of this function is to start a new process and then return the window | |
# that was opened by the started process. This can be difficult because if you already have | |
# multiple windows open for that process; there may be a delay in the window being returned | |
# after the process is started; and the process that is started is not always the same as the | |
# window that's created (Chrome). | |
# | |
# This function will grab a list of current windows matching the processName, start a new instance, | |
# and will then loop until the new window is opened or the function times out. example: | |
# |
This file contains 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
#Renames FogBugz installer and replaces it with Notepad. | |
#Copy the following into a Powershell console. | |
ren $env:appdata\kilninstaller\FogBugz-Setup.exe $env:appdata\kilninstaller\FogBugz-Setup.exe.bak; | |
copy $env:systemRoot\Notepad.exe $env:appdata\kilninstaller\FogBugz-Setup.exe |
This file contains 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
#BugBreadcrumbs .breadcrumbs { | |
overflow: hidden; | |
margin-left: -2px; | |
} | |
#BugBreadcrumbs .breadcrumbs li { | |
float: left; | |
padding: 5px 0 5px 30px; | |
background: #eee; | |
color: #999; | |
position: relative; |
##Introduction
Have you ever wanted to subscribe to conversations in Help Scout? With Help Scout webhooks and webscript.io, now you can! Just add subscribed-yourname
as a tag to a conversation (where yourname
is the first part of your company email address), and you'll get emailed when a change comes in.
##Set up
- Make a webscript.io account. It's free to test.
- In webscript.io, make a new script. Copy in the code from the_code.lua (below) in this gist and paste it into the script.
- Be sure to change the variables at the top.
- If you need an SMTP server, you can get one from Mandrill in seconds (free accounts can send up to 12K emails per month, so you'll be fine).
#Random Assignment for Help Scout
When you have conversations that are handled by multiple individuals on a team, it can be difficult to distribute the tasks evenly to each member without cherry picking or having someone manage the queue.
This script helps by taking unassigned conversations and re-assigning them randomly to the members of the team, based on a specified weight.
This file contains 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
// ==UserScript== | |
// @name Help Scout - Hide Negative Satisfaction Ratings | |
// @namespace https://secure.helpscout.net | |
// @include https://secure.helpscout.net/* | |
// @description Hides Not Good and Okay satisfaction ratings within conversations | |
// @author Ben McCormack | |
// @version 1.0.0.0 | |
// ==/UserScript== | |
This file contains 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
// ==UserScript== | |
// @name Help Scout - Add Edit Links to Articles | |
// @namespace http://your.help.site.com | |
// @include http://your.help.site.com/article/* | |
// @description Inserts Edit this article links in the top right of Help Scout support articles | |
// @author Ben McCormack | |
// @version 1.0.0.0 | |
// ==/UserScript== | |
//You need to insert the 24 digit hexadecimal docsID below in the doSomething() function. |
This file contains 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
#include <stdio.h> | |
int movingAvg(int *ptrArrNumbers, long *ptrSum, int pos, int len, int nextNum) | |
{ | |
//Subtract the oldest number from the prev sum, add the new number | |
*ptrSum = *ptrSum - ptrArrNumbers[pos] + nextNum; | |
//Assign the nextNum to the position in the array | |
ptrArrNumbers[pos] = nextNum; | |
//return the average | |
return *ptrSum / len; |
OlderNewer