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
/* | |
Copyright (c) 2017 Lars Pastewka | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files | |
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, | |
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do | |
so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
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
# Copyright (c) 2015 Lars Pastewka | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files | |
# (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, | |
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do | |
# so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
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
Place fonts in $HOME/.fonts or other directory of choice. | |
Create file $HOME/.config/fontconfig/fonts.conf with following content: | |
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<!-- ~/.fonts.conf for per-user font configuration --> | |
<fontconfig> | |
<dir>~/.fonts</dir> | |
</fontconfig> |
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
from django.template import Context, Template | |
print Template("""<script type="text/javascript"> | |
var foo = 1, | |
bar = 2, | |
url = '{% url view_name obj "'+foo+'" "'+bar+'" %}'; | |
</script>""").render(Context(dict(obj='something'))) | |
# Output: | |
<script type="text/javascript"> |
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
/* ====================================================================== | |
Copyright (2013) Lars Pastewka | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |