This is a manual for installing DemocracyOS app in CentOS.
- MongoDB =========== Installing MongoDB and starting its daemon:
#!/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) |
#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" |
#!/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: |
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. |
#!/bin/sh | |
if [ ! -f sublime_text_3.tar.bz2 ]; then | |
curl -L "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x32.tar.bz2" -o "sublime_text_3.tar.bz2" | |
fi | |
tar -xvjf sublime_text_3.tar.bz2 | |
sudo cp -fr "sublime_text_3/sublime_text.desktop" "/usr/share/applications/sublime_text.desktop" | |
sudo sed -i 's/Icon=sublime-text/Icon=\/opt\/sublime_text\/Icon\/128x128\/sublime-text.png/g' /usr/share/applications/sublime_text.desktop | |
rm -rf /opt/sublime_text |
from django import template | |
from django.template import resolve_variable, NodeList | |
from django.contrib.auth.models import Group | |
register = template.Library() | |
@register.tag() | |
def ifusergroup(parser, token): | |
""" Check to see if the currently logged in user belongs to one or more groups |
slugify=function(str){ | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { | |
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); | |
} |
#!/bin/sh | |
echo | |
exec /usr/bin/uptime |