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
| //Unfortunately, the callbacks that are in 2.1 don't exist in v.1.1.3 so you'll need to update the CPP | |
| //whenever the user lands on a "page" | |
| SurveyUrlBuilder | |
| .instance() | |
| .addCustomCpp("pageName","some page name"); |
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 | |
| entry=$1 | |
| if grep -Fxq "$entry" hosts | |
| then | |
| echo "Hosts file already contains $entry" | |
| else | |
| echo "$entry" >> hosts | |
| fi |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.fsr.mobilemonitor</groupId> | |
| <artifactId>MobileMonitor.App</artifactId> | |
| <version>1.0.3-SNAPSHOT</version> | |
| <packaging>apk</packaging> | |
| <name>FSR Mobile Monitor Android app</name> |
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
| 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" | |
| } | |
| } | |
| } |
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
| input { | |
| file { | |
| type => "syslog" | |
| path => ["/var/logs/*"] | |
| } | |
| file { | |
| type => "java" | |
| path => ["/var/logs/java/*"] | |
| codec => multiline { | |
| pattern => "%{JAVA_MULTILINE_STACKTRACE}" |
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 | |
| 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 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
| ### 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 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 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 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
| 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 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
| <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" /> |
OlderNewer