Skip to content

Instantly share code, notes, and snippets.


Alonisser alonisser

View GitHub Profile
View nginx-dashboard.json
"title": "Nginx Web",
"services": {
"query": {
"list": {
"0": {
"query": "response:[200 TO 299]",
"alias": "OK",
"color": "#7EB26D",
"id": 0,
View update postgres last
This utility addresses the InegrityError that occurs when you try to add a new record to
(probably a recently ported) postgres database while using Django, here's more . . .
duplicate key value violates unique constraint "<app>_<table>_pkey"
DETAIL: Key (id)=(2) already exists.
The problem here is that the Postgres sequence generators are out of sync with your data.
Here's a good overview:
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04) trying on ubuntu server 14.04
# Add Google Chrome's repo to sources.list
echo "deb stable main" | sudo tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source:
#Inspired by
#Since every `git pull` is actually a merge. We can use it to automaticly run basic Django tasks after pulling from the upstream master branch (or any other)
#Notice: This won't run at git fetch. since fetch doesn't merge anything
# copy this script with the name:`` to your project root folder
# symlink it to the ./git/hooks/post-merge: `ln .git/hooks/post-merge
#You should have bash (windows users, means cygwin/mingw anything that works for you
#Based on the instructions here: