This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # | |
| # Replacement script for the `pdnsutil hash-password` command | |
| # | |
| from base64 import b64encode | |
| from getpass import getpass | |
| from hashlib import scrypt | |
| from os import urandom | |
| from sys import argv |
This file contains hidden or 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
| <!doctype html> | |
| <!-- | |
| Usage: weasyprint lettre.html lettre.pdf | |
| --> | |
| <html lang="fr"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title></title> | |
| <style> | |
| @charset "UTF-8"; |
This file contains hidden or 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
| 1. Install dependencies | |
| wget 'https://use.fontawesome.com/releases/v5.9.0/fontawesome-free-5.9.0-web.zip' | |
| unzip fontawesome-free-5.9.0-web.zip | |
| rm fontawesome-free-5.9.0-web.zip | |
| pipenv install jinja2 | |
| pipenv install weasyprint | |
| 2. Edit content.py | |
| 3. Generate the PDF |
This file contains hidden or 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
| cargo tree --no-indent | cut -d ' ' -f1,2 | sed 's/ v/-/' | sort | uniq | while read -r name ; do size=$(stat --printf="%s" "$(find "$HOME/.cargo/registry/cache/" -mindepth 1 -maxdepth 1 -print)/$name.crate"); printf "%07d %s\n" "$size" "$name"; done | sort |
This file contains hidden or 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
| require ["fileinto", "imapflags"]; | |
| if header :contains "sender" "pluckhq.com" { | |
| setflag "\\Seen"; | |
| fileinto "Junk"; | |
| } |
This file contains hidden or 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
| # Ignore everything except .gpg files | |
| # Useful when you want to sync encrypted files only. | |
| * | |
| !*.gpg | |
| !*/ |
This file contains hidden or 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
| for dir in $(find ./ -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*'); do if [ -d "$dir/locale" ]; then cd "$dir"; django-admin.py compilemessages; cd ..; fi; done |
This file contains hidden or 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/sh | |
| # Inline version: | |
| # find . -wholename "./*/migrations" -prune -o -wholename "./docs/*" -prune -o -name "*\.py" -exec pep8 {} \; | |
| final_exit=0 | |
| for file in $(find . -wholename "./*/migrations" -prune -o -wholename "./docs/*" -prune -o -name "*\.py" -print); do | |
| pep8 "$file" | |
| if [ $? -ne 0 ]; then | |
| final_exit=1 | |
| fi |
This file contains hidden or 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/env python | |
| ## | |
| ## Copyright (c) 2014 Rodolphe Breard | |
| ## | |
| ## Permission to use, copy, modify, and/or distribute this software for any | |
| ## purpose with or without fee is hereby granted, provided that the above | |
| ## copyright notice and this permission notice appear in all copies. | |
| ## | |
| ## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| ## WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |