Skip to content

Instantly share code, notes, and snippets.

@pau
pau / gist:1144001
Created August 13, 2011 16:23
Ubuntu 10.04 LTS USB 3.0 Suspend/Hibernate Fix
We couldn’t find that file to show.
@pau
pau / gist:1098900
Created July 22, 2011 04:36
Set Relative Path of Django SQLite Database
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'db', 'test.db'),
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
@pau
pau / gist:1095475
Created July 20, 2011 17:47
ASP.NET Hack to Prevent Double Page Submission
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClientClick="this.disabled=true;" UseSubmitBehavior="false" />
@pau
pau / gist:1032825
Created June 18, 2011 05:09
Remove Blogger Branding
<link href="link to your icon" rel="icon" type="image/x-icon" />
<style type="text/css">
div.navbar {
display: none;
}
footer {
display: none;
@pau
pau / gist:1018454
Created June 10, 2011 08:22
Configure Django, Virtualenv and Pip
# Installing python-virtualenv will also install python-pip.
~$ sudo apt-get install python-virtualenv
# Create an isolated virtual environment called test_env.
~$ virtualenv test_env --no-site-packages
# Install the django package on test_env.
~$ pip install django -E test_env
@pau
pau / gist:1018240
Created June 10, 2011 04:43
Enable Brightness Controls in Ubuntu 11.04 using NVIDIA
# /etc/X11/xorg.conf
Section "Device"
Identifier "Default Device"
Option "NoLogo" "True"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection