Skip to content

Instantly share code, notes, and snippets.

View ysinjab's full-sized avatar
🎯
Focusing

Yasser Sinjab ysinjab

🎯
Focusing
View GitHub Profile
@Ryanb58
Ryanb58 / install.md
Last active May 17, 2024 13:42
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> 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]
@mraaroncruz
mraaroncruz / JSONB.go
Created June 8, 2016 12:33
JSONB for postgres in Golang
// 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)

HEADpoints to C and the index matches C.

--soft