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 class PreferredBuilder { | |
| private String a; | |
| private int i; | |
| public PreferredBuilder() { | |
| } | |
| public PreferredBuilder(Builder builder) { | |
| this.a = builder.a; |
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
| -- Personal preference for unpivot | |
| SELECT | |
| SUBSTR(CLMN, 0, INSTR(CLMN,'_TOTAL_FROM', 1, 1)-1) AS COLOR, COUNT, COUNT/TOTAL*100 || '%' AS PCT, TOTAL, FROM_DATE, TO_DATE | |
| FROM ( | |
| WITH SUMMARY AS | |
| (SELECT | |
| TO_DATE('2015-09-28','YYYY-MM-DD') AS FROM_DATE, TO_DATE('2015-10-01','YYYY-MM-DD') AS TO_DATE, 100000 AS TOTAL, 90000 AS BLUE, | |
| 5000 AS RED,3000 AS GREEN,0 AS YELLOW | |
| FROM DUAL) | |
| SELECT * FROM SUMMARY |
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
| keytool -importkeystore -srckeystore "source-keystore.jks" -destkeystore "destination-keystore.jks" -srcstorepass password -deststorepass password -srcalias "alias" |
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
| // Also: https://maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html | |
| // pom.xml pieces | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>versions-maven-plugin</artifactId> | |
| <version>${versions-maven-plugin.version}</version> | |
| </plugin> | |
| <plugin> |
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
| var handleSuccess = (function () { | |
| var latestRequestTimestamp = 0; | |
| return function handleSuccess(timestamp, data) { | |
| if (timestamp < latestRequestTimestamp) { return; } | |
| latestRequestTimestamp = timestamp; | |
| / stuff | |
| }; | |
| }); |
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.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.StringTokenizer; | |
| import java.util.regex.Pattern; | |
| /** | |
| * Class: StringPerformance | |
| */ | |
| public class StringPerformance { |
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 | |
| # | |
| # REF: https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure-ssl-certificate/#bkmk_selfsigned | |
| # | |
| ###### serverauth.cnf ##### | |
| #[ req ] | |
| #default_bits = 2048 | |
| #default_keyfile = privkey.pem | |
| #distinguished_name = req_distinguished_name | |
| #attributes = req_attributes |
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
| // ==UserScript== | |
| // @name Remove Twitter Inline Images | |
| // @namespace fixTheTwittersNet | |
| // @version 0.2 | |
| // @include /^https?://www\.twitter\.com/.*$/ | |
| // @include /^https?://twitter\.com/.*$/ | |
| // @author This dude | |
| // @description This script removes inline images until you click the expand button | |
| // ==/UserScript== | |
| /* jshint -W097 */ |
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
| openssl genrsa -out server.key -passout pass:test 1024 | |
| openssl req -new -subj "/CN=localhost" -key server.key -out server.csr | |
| openssl x509 -req -days 36500 -in server.csr -signkey server.key -out server.crt | |
| ## Lines needed in the Apache configuration to enable SSL (probably in a <VirtualHost *:443> tag): | |
| # SSLEngine on | |
| # SSLProtocol all -SSLv2 | |
| # SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA | |
| # SSLCertificateFile /keylocation/server.crt |
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/sh | |
| sort -n | awk ' | |
| BEGIN { | |
| c = 0; | |
| sum = 0; | |
| } | |
| $1 ~ /^[0-9]*(\.[0-9]*)?$/ { | |
| a[c++] = $1; | |
| sum += $1; | |
| } |