This file contains hidden or 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
name: View Selected Cases | |
description: Adds a link to the titlebar (if there is one) to open all selected cases in new windows. | |
author: Daniel Jalkut, Doug Napoleone | |
version: 1.0.0.0 | |
js: | |
// Based on original code by Daniel Jalkut: https://gist.github.com/danielpunkass/5612389 | |
if ($('div.viewMoreOptions')) { | |
$('div.viewMoreOptions') |
This file contains hidden or 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
name: View All Unread Cases | |
description: Adds a link to the titlebar (if there is one) to open all unread cases in new windows. | |
author: Daniel Jalkut, Doug Napoleone | |
version: 1.0.0.0 | |
js: | |
// Based on original code by Daniel Jalkut: https://gist.github.com/danielpunkass/5612389 | |
// but not one line of code survived. | |
if ($('div.viewMoreOptions')) { |
This file contains hidden or 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
name: Case Title Summary | |
description: Add a cut&pasteable form of the case in the form of 'Category:1234 ("title here")' to cases. | |
author: Napoleone, Doug | |
version: 1.0.0.0 | |
js: | |
// TODO: Fill this in | |
if (!window.goBug || !$("#bugviewContainer").length || $("#miniBugList").length) | |
return; // Don't do anything unless we're looking at a single bug :-( |
This file contains hidden or 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
name: Auto Fill Custom Fields | |
description: Find any arguments on in the URL for a new case which start with 'custom_' and attempt to fill that field with the value. | |
author: Doug Napoleone | |
version: 1.0.0.0 | |
js: | |
// based on inspiration from: | |
// http://fogbugz.stackexchange.com/questions/2427/feature-request-pre-fill-custom-fields-on-new-case-edit-page-via-url-parameter | |
// But only 1 line remains from that origional. |
This file contains hidden or 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
name: Wiki Embed Video | |
description: Makes .mp4 and .m4v video attachments HTML5 playable | |
author: Napoleone, Doug | |
version: 1.0.0.0 | |
js: | |
// TODO: Fill this in | |
if ($('#idEditArticle')) { | |
var videos = $('a[href$=".m4v"], a[href$=".mp4"]'); |
This file contains hidden or 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
## in answer to Armin Ronacher's http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ | |
import sys | |
import shutil | |
for filename in sys.argv[1:]: | |
f = sys.stdin.buffer | |
if filename != '-': | |
try: |
This file contains hidden or 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
from setuptools import setup, find_packages | |
from setuptools import Extension | |
from setuptools.command.install import install | |
from setuptools import Command | |
from setuptools.dist import Distribution | |
from wheel.bdist_wheel import bdist_wheel | |
class BinaryDistribution(Distribution): | |
def is_pure(self): | |
return False |
This file contains hidden or 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
## The Perforce P4Python api and p4 -G (marshalled data) do not return the diff data shown when you use the 'p4 describe' | |
## command to describe a changeset. You need to run the P4Python API in untagged mode. But then you have to parse things yourself. | |
## But the untagged data is partially structured. Each piece of data is included with embedded newlines. The file diff section has each | |
## header and then the diff data. The tagged data returned from the P4Python API has each file's data split into independent lists. | |
## So you get the file names and revisions each as independent lists. But the file diff section may not include all files. Some | |
## might be binary, some might be too large to diff (by server settings), etc. So you want to add two new lists to the tagged | |
## output, one for the headers and one for the diff raw data, but you want them to be aligned with the depotFiles listing. | |
## and using '' has sentinal place holders. So here we go: | |
import P4 |
This file contains hidden or 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 argparse | |
import functools | |
def _call(func, args): | |
# RED_FLAG: add nargs | |
kwds = dict((name, getattr(args, name, None)) for name in func._arguments) | |
return func(**kwds) | |
def _command(subparsers, defaults, passthrough, description, **kwds): | |
def subcommand(parsers, defaults, passthrough, description, kwds, func): |
OlderNewer