Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://stackoverflow.com/a/3277407/422670 and in particular comment by http://stackoverflow.com/users/81636/gatoatigrado | |
class First(object): | |
def __init__(self): | |
print "first prologue" | |
super(First, self).__init__() | |
print "first epilogue" | |
class Second(First): | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# an rsync script that will synchronize files every time there's a modification | |
# in a WATCHed location, detected through fswatch | |
# https://github.com/emcrisostomo/fswatch | |
# (install fswatch through brew) | |
# | |
# this script could even be more general and allow executing anything, | |
# not just rsync; it's actually even overkill for the way it's used, since | |
# rsync is simple re-launched entirely and not just for the modified file! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Equivalences between different AngularJS Provider constructs. | |
* Related documentation: | |
* - https://docs.angularjs.org/guide/providers | |
* and in particular checkout the summary: https://docs.angularjs.org/guide/providers#conclusion | |
* | |
* Related tutorials: | |
* AngularJS Patterns #27-#32 | |
* - https://www.youtube.com/watch?v=Wrjjp_Up8K0 | |
* - https://www.youtube.com/watch?v=8qOI5OUommo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Very simple PaginatedListView | |
""" | |
class PaginatedListView(ListView, FormView): | |
queryset = None | |
def get_context_data(self, **kwargs): | |
#logging.debug('ApplicationListView.get_context_data') | |
context = super(self.__class__, self).get_context_data(**kwargs) |