Skip to content

Instantly share code, notes, and snippets.

Avatar

Case Larsen clarsen

  • San Francisco, CA
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am clarsen on github.
  • I am clarsen (https://keybase.io/clarsen) on keybase.
  • I have a public key whose fingerprint is 17D7 109F 488B 5511 C079 C0D9 F348 CA49 4485 7051

To claim this, I am signing this object:

@clarsen
clarsen / gist:57a3fab83136784f0e48db2f1a49b6cd
Created Sep 12, 2019
Example forcible, replace-on-success Luigi task
View gist:57a3fab83136784f0e48db2f1a49b6cd
# generation.py
class ForcibleTask(luigi.Task):
force_task_families = luigi.ListParameter(
positional=False, significant=False, default=[]
)
def complete(self):
print("{}: check {}".format(self.get_task_family(), self.output().path))
if not self.output().exists():
self.oldinode = 0 # so any new file is considered complete
View 2013-04-12-TUAW_Waldie.applescript
-- This property controls whether full project paths (including parent folders) are displayed
property includeFullProjectPaths : true
-- These properties control whether additional task content is displayed
property includeTaskContext : true
property includeTaskEstimatedTime : true
property includeTaskStartDate : true
property includeTaskModificationDate : true
property includeTaskCompletionDate : true
property includeTaskNotes : true
View this is a gist
This is a gist.
1. text
2. more text
3. done
View .bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
# bsag: I combined the best of both worlds and used the parse_git_dirty function here:
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/#comment-4166
# as well as various other mods from the forks of this gist.
function parse_git_dirty {
git diff --quiet HEAD &>/dev/null
You can’t perform that action at this time.