Skip to content

Instantly share code, notes, and snippets.

View eleclerc's full-sized avatar

Eric Leclerc eleclerc

View GitHub Profile
@eleclerc
eleclerc / flow export bookmarklet
Last active December 11, 2015 18:41
Convert Polar flow links in calendar to direct tcx export instead of detailed view
javascript:(function(){$(".training%20.exercise%20a").each(function(i,v){v.href%20=%20v.href%20+%20"/export/tcx/false";});})();
@eleclerc
eleclerc / spring-boot-jsp-tiles3.md
Last active January 13, 2020 08:22
Spring Boot wit JSP/Tiles3

Spring Boot with JSP and Tiles3

Using tiles and jsp on a Spring Boot 1.2.7 project

file: pom.xml

under <project>

<packaging>war</packaging>
diff --git a/modules/src/main/java/org/archive/modules/extractor/ExtractorHTML.java b/modules/src/main/java/org/archive/modules/extractor/ExtractorHTML.java
index ef84964..dfb563b 100644
--- a/modules/src/main/java/org/archive/modules/extractor/ExtractorHTML.java
+++ b/modules/src/main/java/org/archive/modules/extractor/ExtractorHTML.java
@@ -138,7 +138,7 @@ public class ExtractorHTML extends ContentExtractor implements InitializingBean
"(?is)<(?:((script[^>]*+)>.*?</script)" + // 1, 2
"|((style[^>]*+)>.*?</style)" + // 3, 4
"|(((meta)|(?:\\w{1,"+MAX_ELEMENT_REPLACE+"}))\\s+[^>]*+)" + // 5, 6, 7
- "|(!--(?!\\[if).*?--))>"; // 8
+ "|(!--(?!\\[if|>).*?--))>"; // 8
@eleclerc
eleclerc / Solarized (Dark).tmTheme
Created February 25, 2012 00:38
Solarized theme (dark & light) with markdown support for Sublime Text 2 editor
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Solarized (dark)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@eleclerc
eleclerc / solarized-light-markdown.diff
Created February 18, 2012 01:05
Markdown support in Solarized (Light) in Sublime Text 2 - 2165
--- Color Scheme - Default/Solarized (Light).tmTheme 2012-02-08 19:39:09.000000000 -0500
+++ User/Solarized (Light).tmTheme 2012-02-13 19:26:32.000000000 -0500
@@ -1368,17 +1368,6 @@
</dict>
<dict>
<key>name</key>
- <string>Markdown: Raw</string>
- <key>scope</key>
- <string>text.html.markdown markup.raw.inline</string>
- <key>settings</key>
@eleclerc
eleclerc / build.xml
Created June 25, 2010 13:16
my phing skeleton build file
<?xml version="1.0"?>
<project name="change-me" default="build">
<target name="build" description="Placeholder">
<echo msg="See list of availlable tasks by executing: phing -l" />
</target>
<target name="lint">
<phplint haltonfailure="yes" level="verbose">
@eleclerc
eleclerc / markdown-server.php
Created June 20, 2010 01:42
web server in php to serve markdown documents as html
<?php
/**
* The web server for Markdown document.
*
* The useless server developed as a learning exercise.
*
* Will serve every `*.markdown` file in current directory as html file.
* note: uses a modified markdown for syntax highlighting: http://gist.github.com/113004
*/
@eleclerc
eleclerc / zfish.filter.php
Created December 18, 2009 16:18
ZendFramework-ish filter for PHP_Beautifier
<?php
/**
* A ZendFramework-ish filter for PHP_Beautifier
*
* This file have to go in:
* /path/to/pear/php/Beautifier/Filter/
*
* Use it in conjunction with Pear() and NewLines() filters:
* php_beautifier --input "/path/to/your-file.php" --filter="Pear() zfish() NewLines(after=T_DOC_COMMENT)"
*
@eleclerc
eleclerc / ZFishCodingStandard.php
Created December 18, 2009 15:51
ZendFramework-ish Coding Standard for PHP_CodeSniffer, mainly based on the PEAR one.
<?php
/**
* ZendFramework-ish Coding Standard for PHP_CodeSniffer 1.2
*
* @see http://pear.php.net/package/PHP_CodeSniffer
* @see http://framework.zend.com/manual/en/coding-standard.html
*
* Put this file in
* /path/to/PHP_CodeSniffer/CodeSniffer/Standards/ZFish
* and launch CodeSniffer with
@eleclerc
eleclerc / Danceric_Log_Writer_Xmpp.php
Created December 2, 2009 01:28
Zend Log Writer XMPP (gtalk)
<?php
/**
* Writter for Zend_Log that use the XMPP protocol.
*
* This class depends on XMPPHP library from http://code.google.com/p/xmpphp
* Note: The recipient must have added the sender to his roster/contactlist
* in order for him to receive the message
*
* @category Danceric
* @package Danceric_Log