Skip to content

Instantly share code, notes, and snippets.

View skyl's full-sized avatar

Skylar Saveland skyl

View GitHub Profile
@skyl
skyl / kwacros.py
Created February 1, 2012 05:03
Django Template macros with args and kwargs
#
# templatetags/kwacros.py - Support for macros in Django templates
#
# Based on snippet by
# Author: Michal Ludvig <michal@logix.cz>
# http://www.logix.cz/michal
#
# modified for args and kwargs by Skylar Saveland http://skyl.org
#
@skyl
skyl / django_hasher.py
Last active February 25, 2022 06:01 — forked from steve-chavez/django_hasher.py
Use django hasher to make password
# you have to have a django project to do it this way
# You can run this in a `./manage.py shell`
from django.contrib.auth.hashers import make_password
make_password("youreverysecuresuperpass")
# this will output something that looks like this:
# 'pbkdf2_sha256$260000$rgjSFB3xwsxkfcL1iE8wq6$bDtiRY0+gtE4ahFdfDeHwy0tzLb8McDRnppS8kD8QJs='
# by default in Django 4.0

You can find the complete source of this zPage here


Special Free2z Syntax Extensions: Now Extra Peppy! 🎉

Embeds

You can embed a plethora of exciting content with the ::embed[URL] directive.

@skyl
skyl / install.rb
Last active March 21, 2024 17:58
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ''
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
HOMEBREW_CACHE = '/Library/Caches/Homebrew'
HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew'