Skip to content

Instantly share code, notes, and snippets.

View HondoOhnaka's full-sized avatar

Hondo HondoOhnaka

  • Ohnaka Transport Solutions
  • Black Spire Outpost, Batuu
View GitHub Profile
@HondoOhnaka
HondoOhnaka / django-launch.json
Created March 28, 2020 04:31 — forked from slaveofcode/django-launch.json
Sample Django Configuration launch.json VSCode (Visual Studio Code)
{
"version": "0.2.0",
"configurations": [
{
"name": "Django",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${workspaceRoot}/venv/bin/python3.4",
"program": "${workspaceRoot}/manage.py",
@HondoOhnaka
HondoOhnaka / git-remove-forever.sh
Created May 15, 2018 18:25 — forked from wdalmut/git-remove-forever.sh
Remove files or folders from git history forever!
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
@HondoOhnaka
HondoOhnaka / gist:b72572dd0f1f6ad26f94
Last active August 29, 2015 14:17 — forked from jimmyeisenhauer/gist:2795771
Drop database and rebuild - Django
heroku pg:reset SHARED_DATABASE --confirm appname
heroku run appname/manage.py migrate
heroku run appname/manage.py createsuperuser
# Orignal version taken from http://www.djangosnippets.org/snippets/186/
# Original author: udfalkso
# Modified by: Shwagroo Team and Gun.io
import sys
import os
import re
import hotshot, hotshot.stats
import tempfile
import StringIO
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
http {
# Default virtual host for www.example.com. This will pick up all HTTP
# requests to port 80 that are not for one of the other virtual hosts.
server {
listen 80;
server_name www.example.com;
# ...your server config here...
import datetime
from django.conf import settings
from django.contrib.auth import logout
from django.contrib.auth.models import User
from django.contrib.sessions.models import Session
from django.http import HttpRequest
from django.utils.importlib import import_module
@HondoOhnaka
HondoOhnaka / pagination.html
Created June 22, 2012 05:00 — forked from cspanring/pagination.html
linaro django pagination template for Bootstrap framework
{# use in combination with https://github.com/zyga/django-pagination #}
{# and http://twitter.github.com/bootstrap/ #}
{# project-dir/templates/pagination/pagination.html #}
{% if is_paginated %}
{% load i18n %}
<div class="pagination">
<ul>
{% block previouslink %}
{% if page_obj.has_previous %}