I hereby claim:
- I am haplo on github.
- I am fidel (https://keybase.io/fidel) on keybase.
- I have a public key whose fingerprint is 7977 CF4B DFCC 46B9 264A 3C2C 7F07 1B7C 479F EDD1
To claim this, I am signing this object:
| #!/bin/bash | |
| # This script backs up files using restic and sends emails on success or errors. | |
| # | |
| # Files that the script expects: | |
| # /usr/local/etc/restic/repo.env: shell variables that define the restic repository | |
| # /usr/local/etc/restic/include.txt: paths to back up | |
| # /usr/local/etc/restic/exclude.txt: paths to not include in the backup, even if they are in include.txt | |
| # | |
| # Inspired by https://gist.github.com/perfecto25/18abbd6cfbaa4e9eb30251470e9b7504 |
| ; put in /etc/ufw/applications.d/kdeconnect | |
| [kdeconnect] | |
| title=KDE Connect | |
| description=Remote smartphone control | |
| ports=1714:1764/tcp|1714:1764/udp |
| Verifying that "fidelramos.id" is my Blockstack ID. https://onename.com/fidelramos |
I hereby claim:
To claim this, I am signing this object:
| from decimal import Decimal | |
| try: | |
| import simplejson as json | |
| except ImportError: | |
| import json | |
| from django.utils.functional import Promise | |
| class CustomJSONEncoder(json.JSONEncoder): |
| from django.contrib import admin | |
| class BlankFilter(admin.SimpleListFilter): | |
| """Abstract base class for filtering blank fields. | |
| To use define a subclass that defines title and parameter_name fields: | |
| class ConcreteBlankFilter(BlankFilter): | |
| title = "some title" |
| #!/bin/bash | |
| # This script converts all MP3 files in the current directory to a | |
| # constant bitrate (128 in this case) using lame. I use this to make | |
| # a more compact version of my music library to fit in a CD for my car. | |
| # | |
| # WARNING: search is recursive and files WILL BE OVERWRITTEN. You probably | |
| # want to make a copy of the files to be converted. | |
| # | |
| # Notes: | |
| # * id3 tags are lost when converting with lame. |
| """ | |
| This fabfile deploys projects versioned in git and that use a virtualenv in the | |
| remote server. | |
| The deploy and deploy_version tasks are framework-independent. | |
| The freshdb task is specific for Django projects. | |
| The restart task is for projects deployed using FastCGI. |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| echo " ("$(parse_git_dirty)${ref#refs/heads/}")" | |
| } | |
| BLUE="\[\033[1;34m\]" |
| from django.db import models | |
| class AuthorManager(models.Manager): | |
| def get_by_natural_key(self, first_name, last_name) | |
| return self.get(first_name=first_name, last_name=last_name) | |
| class Author(models.Model): | |
| first_name = models.CharField(max_length=50) | |
| last_name = models.CharField(max_length=50) |