Skip to content

Instantly share code, notes, and snippets.

@mmrko
mmrko / git-add-no-whitespace.sh
Last active March 14, 2023 21:09
git add files ignoring whitespace
# props: https://stackoverflow.com/questions/3515597/add-only-non-whitespace-changes#answer-7149602
git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero
@anqxyr
anqxyr / archived
Last active July 5, 2018 15:08
Create EPUB files with Python
The gist that used to be here has since been implemented as a complete pip-installable package: https://github.com/anqxyr/mkepub
This notice is left here as a courtesy to the people who starred/bookmarked this gist in the past.
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@yuzawa-san
yuzawa-san / fbfeed2csv.py
Last active January 28, 2021 00:45
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
"""
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
yuzawa-san
https://github.com/yuzawa-san
"""
import json
import urllib2
import time
import csv