Skip to content

Instantly share code, notes, and snippets.

@pau
pau / gist:243ff09d8092ed0dc6e1
Created April 11, 2015 00:48
Ubuntu 12.04 Fresh Install Hash Sum Error
sudo rm /var/lib/apt/lists/*
@pau
pau / gist:c7c868617ad5e3b16463
Created April 11, 2015 00:49
Clone Virtualbox New MAC Address Issue
sudo rm /etc/udev/rules.d/70-persistent-net.rules
@pau
pau / gist:08871c0540113b5e0508
Last active August 29, 2015 14:20
Amazon mp3 Download and Play on Linux
* Buy mp3 and download *.amz file.
* Install clamz to download mp3 files in clamz.
* Play files using nvlc.
# apt-get install jq moreutils
cat file.json | jq . | sponge file.json
@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
@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: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: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: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.