>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
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
## Global Docker image parameters | |
## Please, note that this will override the image parameters, including dependencies, configured to use the global value | |
## Current available global Docker image parameters: imageRegistry and imagePullSecrets | |
## | |
# global: | |
# imageRegistry: myRegistryName | |
# imagePullSecrets: | |
# - myRegistryKeySecretName | |
# storageClass: myStorageClass |
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
func hashify(appList []string, vectorLength int64) ([]int){ | |
hashedList := make([]int, vectorLength) | |
for _, app := range appList { | |
hashedValue := sha256.New() | |
hashedValue.Write([]byte(app)) | |
hexStr := fmt.Sprintf("%x", hashedValue.Sum(nil)) | |
hexInt := new(big.Int) | |
hexInt, ok := hexInt.SetString(hexStr, 16) | |
if !ok { |
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
#ifndef _CRC16_TABLE_H__ | |
#define _CRC16_TABLE_H__ | |
/* A table of the shortest possible alphanumeric string that is mapped by redis' crc16 | |
* to any given redis cluster slot. | |
* | |
* The array indexes are slot numbers, so that given a desired slot, this string is guaranteed | |
* to make redis cluster route a request to the shard holding this slot | |
*/ |
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
// Found in this issue thread https://github.com/jinzhu/gorm/issues/516#issuecomment-109055198 | |
// License unknown | |
// | |
// | |
// Postgres' JSONB type. It's a byte array of already encoded JSON (like json.RawMessage) | |
// which also saves itself correctly to PG's jsonb type. It would probably also work on | |
// PG json types. | |
type JSONB []byte | |
func (j JSONB) Value() (driver.Value, error) { |
When you modify a file in your repository, the change is initially unstaged. In order to commit it, you must stage it—that is, add it to the index—using git add
. When you make a commit, the changes that are committed are those that have been added to the index.
git reset
changes, at minimum, where your current branch is pointing. The difference between --mixed
and --soft
is whether or not your index is also modified. So, if we're on branch master
with this series of commits:
- A - B - C (master)
HEAD
points to C
and the index matches C
.