Skip to content

Instantly share code, notes, and snippets.

View Gonzalo2683's full-sized avatar
🎯
Focusing

Gonzalo Guevara Gonzalo2683

🎯
Focusing
View GitHub Profile
@Gonzalo2683
Gonzalo2683 / README.md
Last active May 15, 2020 06:17 — forked from juampynr/README.md
[Redirect to node after save] Make Drupal not to redirect to the node display after saving it #Drupal

Drupal's default behavior is to redirect the user to the full display of a node after it has been saved.

If you want to stay in the edit form after saving, add this snippet to a custom module adjusting the module namespace in the two functions.

Acknowledgements

@Gonzalo2683
Gonzalo2683 / script.sh
Last active May 15, 2020 06:19 — forked from tonylukasavage/script.sh
[Git stash] Move all uncommitted changes to a new branch and revert the existing branch to HEAD."master" has uncommitted changes. You decided you'd rather make those changes in "dev_branch". Here's how to move those uncommitted changes to "dev_branch" and then revert "master" to its last commit. #Git
# get into the master branch
git checkout master
# create a new branch for the changes and check it out
git checkout -b dev_branch
# stash the changes until we revert master
git stash
# go back to master
@Gonzalo2683
Gonzalo2683 / 0_reuse_code.js
Created April 4, 2017 18:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Gonzalo2683
Gonzalo2683 / gist:c4cc0355333a63c95f28
Last active September 11, 2015 13:53 — forked from fajrif/gist:1265203
git clone specific tag
git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master