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
| // js to add shortcut to go directly to node view from graph browser | |
| // use: got to graph view, and run bookmarklet. once enabled, | |
| // hold down cmd and click a node to go to its edit view | |
| javascript: (function(){ | |
| require('webadmin').modules.browser.view.visualizedView.viz.sys.renderer.bind("node:click", function(node, ev) { | |
| var data = node.data; | |
| if (typeof data.neoNode === "undefined") { | |
| return; | |
| } |
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
| """ socket server for parsing streaming xml | |
| based on | |
| http://stackoverflow.com/a/2270249/105043 and | |
| http://eventlet.net/doc/examples.html#echo-server | |
| usage: | |
| $ python iterxml.py & | |
| # push two documents to make sure we can start over | |
| $ cat sample.xml sample.xml |nc localhost 6000 |
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
| #!/bin/bash | |
| progname=$(basename $0) | |
| if [ "$1" = "--setup" ] | |
| then | |
| origin=$(git config --get remote.origin.url) | |
| git remote add pulls $origin | |
| git config remote.pulls.fetch "+refs/pull/*/head:refs/remotes/pulls/pr/*" | |
| elif [ -z "$(git config --get remote.pulls.url)" ] |
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
| """ | |
| jQuery templates use constructs like: | |
| {{if condition}} print something{{/if}} | |
| This, of course, completely screws up Django templates, | |
| because Django thinks {{ and }} mean something. | |
| Wrap {% verbatim %} and {% endverbatim %} around those | |
| blocks of jQuery templates and this will try its best |
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
| # only load the commands when launching shell. | |
| # if you make frequent edits to your fab file, consider moving this inside _fab() | |
| _fab_commands=$(~/path/to/virtualenv/bin/fab --fabfile=~/path/to/fabfile/fabfile.py --shortlist) | |
| _fab() | |
| { | |
| local cur prev | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| prev="${COMP_WORDS[COMP_CWORD-1]}" | |
| COMPREPLY=( $(compgen -W "${_fab_commands}" -- ${cur}) ) |
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
| (function() { | |
| })(); |
NewerOlder