This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #INSTALL | |
| sudo add-apt-repository ppa:gloobus-dev/gloobus-preview | |
| sudo apt-get update | |
| sudo apt-get install gloobus-preview gloobus-sushi | |
| #For the oppenoffice documents to work, you should install unoconv too | |
| sudo apt-get install unoconv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #When dropbox is not working on ubuntu 12 | |
| #you tried to execute on terminal: | |
| #dropbox start | |
| #and the error is something like this: | |
| #Starting Dropbox.../home/YOUR_USER/.dropbox-dist/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required #by /usr/lib/x86_64-linux-gnu/libproxy.so.1) | |
| #Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so | |
| #Done! | |
| #FIX | |
| cd /home/YOUR_USER/.dropbox-dist/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [color] | |
| branch = auto | |
| diff = auto | |
| status = auto | |
| [color "branch"] | |
| current = yellow reverse | |
| local = yellow | |
| remote = green | |
| [color "diff"] | |
| meta = yellow bold |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Navigation: | |
| cmd-p Goto Anything ('@' for functions, ':' for line number) | |
| cmd-r Function finder | |
| ctl-g Goto line number | |
| cmd-sft-p Command palette | |
| cmd-sft-f Find in Files | |
| cmd-opt-r Toggle regex when finding | |
| cmd-opt-# Columns | |
| ctr-# Switch columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Snippet from Django Docs | |
| """ | |
| class MultiDBModelAdmin(admin.ModelAdmin): | |
| # A handy constant for the name of the alternate database. | |
| using = 'other' | |
| def save_model(self, request, obj, form, change): | |
| # Tell Django to save objects to the 'other' database. | |
| obj.save(using=self.using) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #setuptools | |
| wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e | |
| tar zxf setuptools-0.6c11.tar.gz | |
| cd setuptools-0.6c11/ | |
| sudo python setup.py install | |
| #pip | |
| wget http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#md5=62a9f08dd5dc69d76734568a6c040508 | |
| tar zxf pip-1.1.tar.gz | |
| cd pip-1.1/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Desktop Entry] | |
| Version=2 | |
| Type=Application | |
| Terminal=false | |
| Icon[pt_BR]=ICON_PATH | |
| Name[pt_BR]=NAME | |
| Exec=EXCEC_PATH | |
| Name=NAME | |
| Icon=ICON_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Download | |
| wget http://effbot.org/media/downloads/PIL-1.1.7.tar.gz | |
| tar zxf PIL-1.1.7.tar.gz | |
| cd PIL-1.1.7 | |
| # Create symbolic links to libs | |
| sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/ | |
| sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/ | |
| sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def convert_filename(value): | |
| """ | |
| Convert Filename. | |
| """ | |
| def newname(text, encoding=None): | |
| from unicodedata import normalize | |
| if isinstance(text, str): | |
| text = text.decode(encoding or 'ascii') | |
| clean_text = text.strip().replace(' ', '-') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Detecting and removing all files that have invalid file names (not ascii names), | |
| that cannot be renamed or removed using ssh, in certain posix servers. | |
| """ | |
| import glob | |
| import os | |
| def isascii(s): | |
| return all(ord(c) < 128 for c in s) |