Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

niespodd niespodd

🎯
Focusing
Block or report user

Report or block niespodd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@niespodd
niespodd / lang_switcher.py
Created Feb 10, 2019
dj i18n lang switcher template tag
View lang_switcher.py
register = Library()
@register.simple_tag(takes_context=True)
def change_lang(context, lang=None, *args, **kwargs):
try:
request = context.get('request')
path = request.path
url_parts = resolve(path)
@niespodd
niespodd / .zshrc
Last active Jan 29, 2019
Bakin' soda for Django development - reduce typing 5x with onomatopoeia shortcuts for Django management commands. Add this to your `~/.*rc` config and type `python manage.py *` no more. Suggestions are more than welcome :-)
View .zshrc
alias mm="python manage.py makemigrations"
alias mmm="python manage.py makemigrations && python manage.py migrate"
alias rrr="python manage.py runserver"
alias tss="python manage.py test"
alias shh="python manage.py shell"
# (optional: you might use Pipenv)
alias sss="source env/bin/activate"
# Enjoy! mmm & rrr
@niespodd
niespodd / package.json
Last active Jul 15, 2019
Making web3/bitcore-lib work with Angular 6
View package.json
{...
"scripts": {
"postinstall": "node patch.js",
...
}
}
@niespodd
niespodd / onclick.js for end screen
Created Oct 28, 2017
Escape TypeForm with form_id without premium, enjoy.
View onclick.js for end screen
javascript:(function(){top.window.location='http://foo.bar/co?tf_id='+typeform.submissionRepository.token.split("$")[0];})();
You can’t perform that action at this time.