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
| def fg = 30 | |
| def bg = 46 | |
| def style = "${(char)27}[$fg;$bg"+"m" | |
| println(style+"HELLO") | |
| /* | |
| +~~~~~~+~~~~~~+~~~~~~~~~~~+ | |
| | fg | bg | color | | |
| +~~~~~~+~~~~~~+~~~~~~~~~~~+ | |
| | 30 | 40 | black | | |
| | 31 | 41 | red | |
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
| .autocomplete-suggestions { | |
| text-align: left; cursor: default; border: 1px solid #ccc; border-top: 0; background: #fff; box-shadow: -1px 1px 3px rgba(0,0,0,.1); | |
| /* core styles should not be changed */ | |
| position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box; | |
| } | |
| .autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; } | |
| .autocomplete-suggestion b { font-weight: normal; color: #1f8dd6; } | |
| .autocomplete-suggestion.selected { background: #f0f0f0; } |
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 com.google.common.hash.Hasher; | |
| import com.google.common.hash.Hashing; | |
| import org.apache.commons.lang3.BooleanUtils; | |
| import javax.servlet.*; | |
| import javax.servlet.annotation.WebFilter; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletRequestWrapper; | |
| import javax.servlet.http.HttpServletResponse; | |
| import javax.servlet.http.HttpServletResponseWrapper; |
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 -e | |
| # JAVA_HOME can be passed as argument if not set | |
| if [ ! -d $JAVA_HOME ]; then | |
| JAVA_HOME=${1} | |
| fi | |
| KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts | |
| if [ ! -f "$KEYSTORE" ]; then | |
| echo "Keystore not found in '$KEYSTORE'" | |
| exit 1 |
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 | |
| # Batch convert videos with HandBrake CLI | |
| # By Ralph Crisostomo - 2016.04.17 | |
| # | |
| # Usage : | |
| # 'sudo ./handbrake.sh /source /destination' | |
| # | |
| # Reference : | |
| # https://forum.handbrake.fr/viewtopic.php?f=6&t=19426 | |
| # https://gist.github.com/czj/1263872 |
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
| public void printClientInfo(HttpServletRequest request) { | |
| final String referer = getReferer(request); | |
| final String fullURL = getFullURL(request); | |
| final String clientIpAddr = getClientIpAddr(request); | |
| final String clientOS = getClientOS(request); | |
| final String clientBrowser = getClientBrowser(request); | |
| final String userAgent = getUserAgent(request); | |
| logger.info("\n" + |
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 java.security.Provider; | |
| import java.security.Security; | |
| import java.util.Enumeration; | |
| public class SecurityProvidersAndAlgorithms { | |
| public static void main(String[] args) throws Exception { | |
| try { | |
| Provider p[] = Security.getProviders(); | |
| for (int i = 0; i < p.length; i++) { | |
| System.out.println(p[i]); |