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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Enumeration; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletRequestWrapper; |
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
#!/bin/bash | |
dir="$HOME/capture" | |
output="$dir/output" | |
urls=`cat "$dir/list.txt"` | |
i=1 | |
for url in $urls; do | |
# Convert url to file name | |
path=`echo $url | sed -e 's/http:\/\/domain\.name\///g'` |
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
var Substring = function(s, e) { | |
this.s = s; | |
this.e = e; | |
this.l = e - s; | |
}; | |
var longestPalindromeFromOffset = function(s, i) { | |
var j, | |
long = new Substring(0, 1); | |
for (j = 1; (j <= (s.length - i)) && ((i - j) >= 0); j++) { |
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
public class FaceletRenderer { | |
private FacesContext context; | |
public FaceletRenderer(FacesContext context) { | |
this.context = context; | |
} | |
/** | |
* Render the Facelets template specified. |
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
Index: CutyCapt.cpp | |
=================================================================== | |
--- CutyCapt.cpp (revision 10) | |
+++ CutyCapt.cpp (working copy) | |
@@ -363,6 +363,7 @@ | |
" --js-can-access-clipboard=<on|off> Script clipboard privs (default: unknown)\n" | |
#if QT_VERSION >= 0x040500 | |
" --print-backgrounds=<on|off> Backgrounds in PDF/PS output (default: off) \n" | |
+ " --no-background=<on|off> Transparent background (as opposed to white background) (default: off) \n" | |
" --zoom-factor=<float> Page zoom factor (default: no zooming) \n" |
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
#!/bin/bash | |
LENGTH=16 | |
if [ "$#" -gt 0 ]; then | |
LENGTH="$1" | |
fi | |
# from: https://gist.github.com/earthgecko/3089509 | |
RESULT=`cat /dev/urandom \ | |
| LC_CTYPE=C tr -dc 'a-zA-Z0-9-.?~!@#$%^&*' \ |
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
#!/bin/bash | |
# This script wraps around mvn -ep to take password without it being revealed. | |
echo -n "Password: " | |
read -s password | |
echo "" | |
mvn -ep "$password" |
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
gem 'sassc', '~> 1.7.1' | |
gem 'sassc-rails', '~> 1.1.0' |
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 java.io.IOException; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletRequest; |
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
<!-- Wrap Request --> | |
<filter> | |
<filter-name>wrapRequestFilter</filter-name> | |
<filter-class>pkg.to.WrapRequestFilter</filter-class> | |
</filter> | |
<filter-mapping> | |
<filter-name>wrapRequestFilter</filter-name> | |
<url-pattern>/*</url-pattern> | |
</filter-mapping> |
NewerOlder