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
| HttpClientBuilder builder = HttpClientBuilder.create(); | |
| try (CloseableHttpClient httpClient = builder.build()) { | |
| HttpGet httpGet = new HttpGet("http://quote.yahoo.com/d/quotes.csv?s=" + from + to + "=X&f=l1&e=.csv"); | |
| ResponseHandler<String> responseHandler = new BasicResponseHandler(); | |
| String responseBody = httpClient.execute(httpGet, responseHandler); | |
| return parseDouble(responseBody); | |
| } catch (IOException e) { | |
| throw new RuntimeException(e); | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
| # based on http://askubuntu.com/questions/589469/how-to-automatically-update-atom-editor | |
| if [ -e /usr/share/atom ] | |
| then | |
| CURRENT=$(/usr/share/atom/atom --version) | |
| echo "Atom $CURRENT is installed." | |
| else | |
| echo "Atom not installed." | |
| fi | |
| echo "Finding latest..." |
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 "Finding latest kubectl..." | |
| # curl -s https://github.com/kubernetes/kubernetes/releases/latest | awk -F '[<>]' '/.*/ { match($0, "tag/([^\"]+)",a); print a[1] }' | |
| LATEST=$(wget -qO- https://github.com/kubernetes/kubernetes/releases/latest | awk -F '[<>]' '/href="\/kubernetes\/kubernetes\/tree\/.*"/ { match($0, "tree/([^\"]+)",a); print a[1] }' | head -1) | |
| echo "Getting $LATEST..." | |
| sudo wget -NP /usr/bin http://storage.googleapis.com/kubernetes-release/release/$LATEST/bin/linux/amd64/kubectl | |
| sudo chmod 755 /usr/bin/kubectl |
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
| docker inspect --format '{{ .NetworkSettings.IPAddress }}:$SERVICE_IP' consul-server \ | |
| | xargs wget --retry-connrefused --tries=5 -q --wait=3 --spider |
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
| find *.md -type f -exec sed -i 's/\t/ /g' {} \; | |
| for f in *.md; do snowcrash $f -o $f.yaml; done |
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
| sudo firewall-cmd --set-default-zone=FedoraWorkstation |
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
| pushd /opt/apache-activemq-5.10.0/ | |
| activemq_local=~/.activemq | |
| export ACTIVEMQ_DATA=${activemq_local}/data | |
| export ACTIVEMQ_TMP=${activemq_local}/tmp | |
| bin/activemq console >${activemq_local}/stdout.log 2>${activemq_local}/stderr.log | |
| popd |
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
| USE [msdb] | |
| BEGIN TRANSACTION; | |
| DECLARE @ReturnCode INT; | |
| SELECT @ReturnCode = 0; | |
| DECLARE @JobCategory NVARCHAR(MAX); | |
| SET @JobCategory = N'[Managementoverzichten]'; |