I hereby claim:
- I am danielschonfeld on github.
- I am danielschonfeld (https://keybase.io/danielschonfeld) on keybase.
- I have a public key whose fingerprint is CA86 1DF9 FA88 14A2 E248 89D2 79CD E100 E500 A7A0
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| public class MetricsWeb extends BaseTaskHook { | |
| private static final Logger log = LoggerFactory.getLogger(MetricsWeb.class); | |
| private static Server server = null; | |
| private static CuratorFramework zk = null; | |
| private static ServiceDiscovery<Void> dsc = null; | |
| @Override | |
| public void prepare(Map conf, TopologyContext context) { | |
| if ("production".equals(conf.get("environment"))) { | |
| initWebConsole(9090); |
| DOMMutationMethods: { | |
| value: function(node, value) { | |
| if (value === undefined) { | |
| node.removeAttribute('value'); | |
| } else if(node.value != value) { | |
| node.value = value; | |
| } else if(node.value === null) { | |
| node.value = null; | |
| } | |
| } |
| //Ported from https://gist.github.com/remino/3036680 (thank you for that!) | |
| def wpautop(String content, boolean br) { | |
| def allhtmlblocks = "(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)" | |
| if (content.trim().length() == 0) return "" | |
| content += "\n" | |
| content = content.replaceAll(/<br \/>\s*<br \/>/, "\n\n") | |
| content = content.replaceAll(/(<${allhtmlblocks}[^>]*>)/,{ | |
| log.error("${it}") |
| #!/bin/sh | |
| cd /usr/local/git_repo/meetup-trunk && git submodule update --init |