You'll need to click "laps" before running the bookmarklet.
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> | |
#include <stdlib.h> | |
typedef struct { | |
int *pArrNumbers; | |
long pSum; | |
int pos; | |
int len; | |
int (*funcMovingAvg)(void *self, int nextNum); | |
} MovingAvg; |
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
import fileinput | |
print 'Dim str As String' | |
print 'str = ""' | |
to_print = [] | |
for line in fileinput.input(): | |
line = line.strip('\n') | |
line_vba = 'str = str & "%s"' % line.replace('"','""') | |
to_print.append(line_vba) |
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
// This is hacky. Have fun. | |
var identity = function(value) { | |
return value; | |
}; | |
var compact = function(list) { | |
var results = []; | |
for (var i = 0; i < list.length; i++){ | |
if (identity(list[i])) results.push(list[i]); |
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
($('div.item').length - $('div.translation p:contains("Waiting for translation")').length) / $('div.item').length |
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
$('p.fontStyle2 img[src^="https://s3.amazonaws.com/unbabel-production/static/img/lang/en.png"]').attr('src', 'https://s3.amazonaws.com/unbabel-production/static/img/lang/en-us.png') |
##Demo
##Installation
Ideally, I'd have a bookmarklet right here that you could just drag to your bookmark window, but I don't have that. You have to make your own. But it's pretty easy.
- Go to http://chriszarate.github.io/bookmarkleter/
- Check the first two options, "URL-encode..." and "Wrap...". You can leave the others unchecked.
This little bit of javascript tries to make Trello cards look a bit nicer when printed, especially for checklists. It gets rid of some of the extra UI elements so the content shows through.
To convert to a bookmarklet:
- Copy the above code to the code box on this page
- Click the button
- Drag the link to your bookmark bar.
- Optionally, right click on the bookmarklet and change the name to "Print Trello Card".
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
import json | |
#via http://stackoverflow.com/a/12944035/166258 | |
def jprint(to_print, indent=4, sort_keys=True): | |
print json.dumps(to_print, indent=indent, sort_keys=sort_keys) |
##Before you begin
This is designed for Python 2.7. You'll need to have the requests
package installed.
##Setup
- Setup 3 files that correspond to the 3 Python files in this gist within a single folder.
- In secrets.py, add your Zendesk account email and token. To get a token, from within Zendesk, go to Settings > API > Token Access (Enabled), then click the plus sign near "Active API Tokens".
- In query_zendesk_search_stats_tags.py, change
SEARCH
andZENDESK_SUBDOMAIN
for your needs. - To run, type
python query_zendesk_search_stats_tags.py
from the command line and press enter. It will take about 2.5 seconds for each 100 tickets in the search. E.g. 811 tickets took ~22 seconds.