{
"@context": "https://schema.org",
"@type": "Person",
"address": {
"@type": "PostalAddress",
"addressLocality": "Colorado Springs",
"addressRegion": "CO",
"postalCode": "80840",
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
{ | |
"meta": { | |
"theme": "elegant" | |
}, | |
"basics": { | |
"profiles": [ | |
{ | |
"url": "https://github.com/hyleung", | |
"username": "hyleung", | |
"network": "GitHub" |
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
(require '[clj-http.client :as http] | |
'[clj-http.util :as http.util] | |
'[clojure.data.xml :as xml] | |
'[clojure.zip :as zip] | |
'[clojure.data.zip.xml :as xml-zip]) | |
(defmethod http/coerce-response-body :xml | |
[_ {:keys [body] :as resp}] | |
(assoc resp :body |
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
<code_scheme name="Ratpack"> | |
<option name="GENERATE_FINAL_PARAMETERS" value="true" /> | |
<codeStyleSettings language="JAVA"> | |
<option name="RIGHT_MARGIN" value="100" /> | |
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" /> | |
<option name="METHOD_CALL_CHAIN_WRAP" value="1" /> | |
<option name="WRAP_FIRST_METHOD_IN_CALL_CHAIN" value="true" /> | |
<option name="WRAP_LONG_LINES" value="true" /> | |
<indentOptions> | |
<option name="INDENT_SIZE" value="2" /> |
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
quicksort :: Ord a => [a] -> [a] | |
quicksort [] = [] | |
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) | |
where | |
lesser = filter (< p) xs | |
greater = filter (>= p) xs |
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
def groupMaps[A,B,C](m:(A,Map[B,C]))(n:(A,Map[B,C])):Map[B,Map[A,C]] = { | |
(m,n) match { | |
case ((a,mm),(b,nn)) if mm.nonEmpty && nn.nonEmpty => | |
Map(mm.head._1 -> Map(a -> mm.head._2, b -> nn.head._2)) ++ groupMaps((a, mm.tail))((b, nn.tail)) | |
case ((a,_),(b,_)) => Map.empty[B,Map[A,C]] | |
} | |
} | |
val hostA = ("hostA", Map("/oauth2/token" -> "1", "/carts/default" -> "2")) | |
val hostB = ("hostB", Map("/oauth2/token" -> "3", "/carts/default" -> "4")) |
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
### Keybase proof | |
I hereby claim: | |
* I am hyleung on github. | |
* I am hyleung (https://keybase.io/hyleung) on keybase. | |
* I have a public key whose fingerprint is F5D2 A8A3 5DB4 6804 FD4A CEC2 D7F6 BE67 6D90 93EF | |
To claim this, I am signing this object: |
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 | |
echo "Cloning '$1' into 'workspace'..." | |
git clone "$1" workspace | |
shift | |
echo "Changing directory to 'workspace/$1'" | |
cd workspace/"$1" | |
shift | |
echo "Running 'mvn $@'" | |
mvn "$@" |
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
input { | |
file { | |
type => "syslog" | |
path => ["/var/logs/*"] | |
} | |
file { | |
type => "java" | |
path => ["/var/logs/java/*"] | |
codec => multiline { | |
pattern => "%{JAVA_MULTILINE_STACKTRACE}" |
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
input { | |
file { | |
type => "tomcat" | |
path => ["/var/logs/*"] | |
codec => multiline { | |
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)|(^\s+...\s[\d]+[\s\w]+$)" | |
what => "previous" | |
} | |
} | |
} |
NewerOlder