git rm -r --cached FILE
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
POST INDEX_NAME/_delete_by_query | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"term": { | |
"field1": "100" | |
} | |
}, |
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
gsettings set org.gnome.Vino require-encryption false |
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
UPDATE cars | |
SET model = subNewCarsTable.newModelName | |
FROM (SELECT | |
nc.id AS carId, | |
nc.model AS newModelName | |
FROM new_cars nc | |
WHERE year=2018) subNewCarsTable | |
WHERE subNewCarsTable.carId = cars.id; |
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
# tested on Elasticseach 6.0.0 | |
curl -XPUT "http://es-host:9200/my_index/_settings" -H 'Content-Type:application/json' -d '{ "index" : { "max_result_window" : 1000000 } }' |
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
# tested on kubernetes 1.10.5 | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
# "0" for unlimited fileupload size | |
nginx.org/client-max-body-size: "100m" | |
name: myproject-gateway-ingress |
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
# tested on kubernetes 1.10.5 | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
nginx.ingress.kubernetes.io/proxy-connect-timeout: "750" | |
nginx.ingress.kubernetes.io/proxy-read-timeout": "600" | |
name: my-project-gateway-ingress |
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
# tested on kubernetes 1.10.5 | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
nginx.ingress.kubernetes.io/proxy-body-size": "100m" | |
name: myproject-gateway-ingress |
I usually use Groovy Console to run code below to get next execution date for Spring cron expressions.
new org.springframework.scheduling.support.CronSequenceGenerator("0 0/5 * * * *").next(new Date())
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private NestedObject nestedObject;
example usage in a test method:
when(nestedObject.getStatusInfo().getValue().getStatus()).thenReturn(1);