Skip to content

Instantly share code, notes, and snippets.

View modu's full-sized avatar

Varun Vyas modu

  • Salesforce
  • San Francisco
View GitHub Profile
@patik
patik / how-to-squash-commits-in-git.md
Last active January 27, 2026 05:12
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@bufke
bufke / document_to_text.py
Last active September 30, 2024 20:46
Convert odt, doc, docx, pdf to text with python and some linux programs. Doesn't require Libreoffice.
from subprocess import Popen, PIPE
from docx import opendocx, getdocumenttext
#http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from cStringIO import StringIO
@hofmannsven
hofmannsven / README.md
Last active February 24, 2026 02:03
Git CLI Cheatsheet