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
| List S3 buckets | |
| >aws s3 ls | |
| List bucket contents | |
| >aws s3 ls s3://bucket --human-readable --summarize | |
| Copy S3 bucket contents to local drive | |
| >aws s3 sync s3://bucket . | |
| Get S3 bucket file permissions |
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
| List all topics | |
| >kafka-topics.sh --bootstrap-server localhost:9092 --list | |
| my-topic | |
| Create new topic | |
| >kafka-topics.sh --bootstrap-server localhost:9092 --create --topic my-topic --replication-factor 3 --partitions 3 | |
| Created topic my-topic | |
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 apt install fonts-powerline | |
| Paste the following into your .bashrc | |
| ################################################################################ | |
| ## FUNCTIONS ## | |
| ################################################################################ | |
| ## | |
| ## ARRANGE $PWD AND STORE IT IN $NEW_PWD |
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 apt-key list | \ | |
| grep "expired: " | \ | |
| sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \ | |
| xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys | |
| Command explanation: | |
| sudo apt-key list - lists all keys installed in the system; | |
| grep "expired: " - leave only lines with expired keys; | |
| sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' - extracts keys; |
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 pull pull a pre-built image from the public repos | |
| docker run run the container in one of 3 modes - Background, Foreground, Interactive | |
| docker ps obtain a list of running containers | |
| docker ps -a obtain a list of both running and stopped containers | |
| docker images obtain a list of all images | |
| docker rm remove container | |
| docker container prune remove stopped containers | |
| docker rmi remove image | |
| docker logs view the logs of the running job | |
| docker commit save the container state as an image |
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"?> | |
| <persons xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ods.co.za" xsi:schemaLocation="http://www.ods.ca.za PersonService.xsd"> | |
| <person isn="3101111" userID="SOFXX" timestamp="2010-02-27T07:36:48+02:00" millis="200"> | |
| <partyID> 2831762 </partyID> | |
| <idNumber type="ID_NUMBER"> | |
| <number> 7777777777777 </number> | |
| </idNumber> | |
| <incomeTaxNumber> 1091919191 </incomeTaxNumber> | |
| <title> Ms </title> | |
| <surname> FIRST </surname> |
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
| HttpHeaders headers = new HttpHeaders(); | |
| headers.setContentType(MediaType.APPLICATION_JSON); | |
| headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON)); | |
| headers.add(ProcessEngineConstants.AUTHOURIZED_USERNAME, username); | |
| HttpEntity<Object> requestEntity = new HttpEntity<Object>("request_headers", headers); | |
| Map<String, Object> restParams = new HashMap<>(); | |
| restParams.put("business_key", "123"); | |
| try { |
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
| From the command line | |
| /usr/libexec/java_home -v 1.8 |
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 app = angular.module('permgen.directives'); | |
| app.directive('numbersOnly', function () { | |
| return { | |
| require: 'ngModel', | |
| link: function (scope, element, attr, ngModelCtrl) { | |
| function fromUser(text) { | |
| if (text) { | |
| var transformedInput = text.replace(/[^0-9]/g, ''); | |
| if (transformedInput !== text) { |
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
| ClassLoader classLoader = getClass().getClassLoader(); | |
| File file = new File(classLoader.getResource("theFile.xml").getFile()); |
NewerOlder