Skip to content

Instantly share code, notes, and snippets.

View xtranophilist's full-sized avatar

Dipesh Acharya xtranophilist

View GitHub Profile
@xtranophilist
xtranophilist / demo_centos.md
Last active December 30, 2015 20:33
DemocracyOS on Centos

This is a manual for installing DemocracyOS app in CentOS.

Setting up the Requirements

  1. MongoDB =========== Installing MongoDB and starting its daemon:
@xtranophilist
xtranophilist / ifappexists_tag.py
Last active December 23, 2015 12:48
Conditional Django template tag to check if one or more apps exist. Usage: {% ifappexists tag %} ... {% endifappexists %}, or {% ifappexists tag inventory %} ... {% else %} ... {% endifappexists %}
from django.template import Library
from django import template
from app import settings
register = Library()
@register.tag
def ifappexists(parser, token):
""" Conditional Django template tag to check if one or more apps exist.
@xtranophilist
xtranophilist / natgeo_pic_of_the_day.sh
Last active November 5, 2015 04:03 — forked from fabianmaass/National Geographic Picture-Of-The-Day Wallpaper Script
National Geographic Picture-Of-The-Day Wallpaper Script
#!/bin/bash
# Copyright (c) 2011 Josh Schreuder
# http://www.postteenageliving.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@xtranophilist
xtranophilist / 10-synaptics.conf
Last active October 12, 2015 22:28
My Synaptics Touchpad Configuration for Xorg
#vi /etc/X11/xorg.conf.d/10-synaptics.conf
#Supports Horizontal and Vertical Edge Scrolling, Two Finger Right click (tested on Dell XPS)
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "VertEdgeScroll" "on"
Option "HorizEdgeScroll" "on"
@xtranophilist
xtranophilist / pre-commit.py
Last active August 29, 2015 14:06 — forked from ptone/gist:4102528
Git pre-commit hook for Python
#!/usr/bin/env python
import glob
import os
import sys
# git usurbs your bin path for hooks and will always run system python
site_packages = glob.glob('%s/lib/*/site-packages' % os.environ['VIRTUAL_ENV'])[0]
sys.path.insert(0, site_packages)