Skip to content

Instantly share code, notes, and snippets.

@khandelwaly
khandelwaly / quickstart.py
Created January 28, 2021 17:44 — forked from cwurld/quickstart.py
Google Calendar Python API with Freebusy
"""
Mostly the Google quickstart.py code with the "freebusy" service running.
Also shows how to make datetimes using pytz.
Follow these instructions to get access credentials:
https://developers.google.com/google-apps/calendar/quickstart/python
"""
@khandelwaly
khandelwaly / change_author_git_commit.md
Created November 20, 2020 16:32 — forked from albertodebortoli/change_author_git_commit.md
Change the author of a commit in Git

Using Interactive Rebase

git rebase -i -p <some HEAD before all of your bad commits>

Then mark all of your bad commits as "edit" in the rebase file, and when git asks you to amend each commit, do

git commit --amend --author "New Author Name <email@address.com>"

edit or just close the editor that opens, and then do

@khandelwaly
khandelwaly / git-reset-author.sh
Created November 20, 2020 16:31 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@khandelwaly
khandelwaly / celery.sh
Created November 18, 2020 14:13 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),