Skip to content

Instantly share code, notes, and snippets.

View DocMinus's full-sized avatar

Alex M. DocMinus

  • RISE AB, Södertälje as well as private
  • Stockholm, Sweden
  • 11:09 (UTC +02:00)
View GitHub Profile
@churnikov
churnikov / README.md
Last active March 7, 2024 12:01
Ketcher and PyScript: draw molecules and use them in python

How to use molecule drawing software Ketcher and PyScript together

This small example shows how to use Ketcher and PyScript.

The process is the following: Ketcher is a JavaScript app, that has js API. PyScript allows us call this api inside of browser.

In order to setup Ketcher and PyScript on your local machine do the following:

  1. Create a new folder. E.g. pyketch;
  2. cd into it;
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active May 26, 2025 13:45
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32: