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
| git revert -m 1 <merge commit hash> |
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
| git branch --merged >/tmp/merged-branches && nano /tmp/merged-branches && xargs git branch -d </tmp/merged-branches |
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
| NOTE : First commit your current changes, or you will lose them. | |
| git rm -r --cached . | |
| git add . | |
| git commit -m "fixed untracked files" |
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
| task buildZip(type: Zip) { | |
| from compileJava | |
| from processResources | |
| into('lib') { | |
| from configurations.compileClasspath | |
| } | |
| } | |
| build.dependsOn buildZip |
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
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:mvc="http://www.springframework.org/schema/mvc" | |
| xsi:schemaLocation=" | |
| http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans.xsd | |
| http://www.springframework.org/schema/mvc | |
| http://www.springframework.org/schema/mvc/spring-mvc.xsd | |
| http://www.springframework.org/schema/context |
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
| # Method 1 | |
| @PostMapping("/users") | |
| public ResponseEntity<List<String>> addUsers() throws IOException { | |
| return ResponseEntity.ok().body(this.userService.addUsers()); | |
| } | |
| # Method 2 | |
| @DeleteMapping() | |
| @ResponseStatus(HttpStatus.NO_CONTENT) |
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
| EXAMPLE JSON: | |
| { | |
| "_id": 12345, | |
| "_class": "com.example.ProductRates", | |
| "rates": [ | |
| { | |
| "productId": NumberInt(1234), | |
| "rate": 100.0, | |
| "rateCardId": NumberInt(1), | |
| "month": NumberInt(201801) |
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
| ### Create virtual environment | |
| python -m virtualenv evn_name | |
| ### Activate environment | |
| source env/bin/activate | |
| ### Deactivate environment | |
| deactivate |
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
| # Build as jupyterhub/singleuser | |
| # Run with the DockerSpawner in JupyterHub | |
| ARG BASE_IMAGE=fusemachinesinc/fusemachines-base-notebook | |
| FROM $BASE_IMAGE | |
| MAINTAINER Fusemachines <info@fusemachines.com> | |
| ADD install_jupyterhub /tmp/install_jupyterhub | |
| ARG JUPYTERHUB_VERSION=master |
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
| 1. Show all images | |
| docker images | |
| 2. Show all running containers | |
| docker ps | |
| 3. Show all running and stopped containers | |
| docker ps -a | |
| 4. Run an container |
NewerOlder