This file contains 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/bash | |
# This script will install a Git pre-push hook that prevents force pushing the master/main branch. | |
# There are three variants that I have built: | |
# - pre-push: prevents force-pushing to master/main. | |
# - pre-push-2: prevents force-pushing to master/main depending on the remote (you need to edit the file!). | |
# - pre-push-3: prevents any type of pushing to master/main. | |
# Set the desired version like this before proceeding: | |
# FILE=pre-push | |
# Single repo installation: |
This file contains 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
# -*- coding: utf-8 -*- | |
"""Add permissions for proxy model. | |
This is needed because of the bug https://code.djangoproject.com/ticket/11154 | |
in Django (as of 1.6, it's not fixed). | |
When a permission is created for a proxy model, it actually creates if for it's | |
base model app_label (eg: for "article" instead of "about", for the About proxy | |
model). |
This file contains 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
# Note (November 2016): | |
# This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information | |
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name yourserver.com; | |
root /path/to/your/htdocs; |
This file contains 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
anglar.module('myApp',['ui']).config(["$provide", function($provide) { | |
return $provide.decorator("$http", ["$delegate", function($delegate) { | |
var get = $delegate.get; | |
$delegate.get = function(url, config) { | |
// Check is to avoid breaking AngularUI ui-bootstrap-tpls.js: "template/accordion/accordion-group.html" | |
if (!~url.indexOf('template/')) { | |
// Append ?v=[cacheBustVersion] to url | |
url += (url.indexOf("?") === -1 ? "?" : "&"); | |
url += "v=" + cacheBustVersion; | |
} |