My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
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
vSphere 6 Enterprise Plus: | |
1C20K-4Z214-H84U1-T92EP-92838 | |
1A2JU-DEH12-48460-CT956-AC84D | |
MC28R-4L006-484D1-VV8NK-C7R58 | |
5C6TK-4C39J-48E00-PH0XH-828Q4 | |
4A4X0-69HE3-M8548-6L1QK-1Y240 | |
vSphere with Operations Management 6 Enterprise: | |
4Y2NU-4Z301-085C8-M18EP-2K8M8 | |
1Y48R-0EJEK-084R0-GK9XM-23R52 |
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
#!/bin/bash | |
# | |
# Bash `flock` example. | |
# Works on: Linux, BSD | |
# Doesn't work on: MacOS | |
# The file which represent the lock. | |
LOCKFILE="`basename $0`.lock" | |
# Timeout in seconds. |
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
<?php | |
/** | |
* Ported from Laravel 4 for external usage. | |
*/ | |
function is($pattern, $value) { | |
if ($pattern == $value) return true; | |
$pattern = preg_quote($pattern, '#'); |
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
# do not allow .git version control files to be issued | |
<Directorymatch "^/.*/\.git+/"> | |
Order deny,allow | |
Deny from all | |
</Directorymatch> | |
<Files ~ "^\.git"> | |
Order allow,deny | |
Deny from all | |
</Files> |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |