This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| package lu.statec.gui.blaise; | |
| import java.awt.event.KeyEvent; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; | |
| import javax.swing.JComponent; | |
| import javax.swing.KeyStroke; | |
| import javax.swing.table.TableModel; | |
| import org.jdesktop.swingx.JXTable; |
| /** | |
| * Remove all files and folders that are older than a set number of days. | |
| * | |
| * @param rootURI The URI of the root folder. All old files and folders in this | |
| * folder are removed. | |
| * @param days Files older than this number of days are deleted | |
| */ | |
| function purgeFiles(rootURI, days) { | |
| var fso = new ActiveXObject("Scripting.FileSystemObject"); |
| /** | |
| * Naive CSV splitter | |
| * | |
| * This splitter is *very* simplistic and may result in errors when parsing | |
| * unknown CSV sources. This works well in the current problem domain. | |
| * | |
| * As we have well defined data, with no escaped quotes inside the fields, we | |
| * can sefaly assume that this will work. | |
| */ | |
| function simpleCsvSplit(lineText){ |
| import dbus.mainloop.glib | |
| import gobject | |
| from subprocess import Popen | |
| dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) | |
| def screensaver_state_changed(new_state): |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
These files represent the different parts for the customisation for the PostgreSQL docs.
All to make the page a bit more readable
| from ConfigParser import SafeConfigParser | |
| from os import getenv, pathsep, getcwd | |
| from os.path import expanduser, exists, join | |
| import logging | |
| LOG = logging.getLogger(__name__) | |
| CONF = None | |
| def config(group, app, search_path=None, conf_name=None, force_reload=False): | |
| """ |
| # | |
| # Bash completion for fabric | |
| # | |
| function _fab_complete() { | |
| local cur | |
| if [[ -f "fabfile.py" || -d "fabfile" ]]; then |
| """ | |
| quick-and-dirty word filter. | |
| It could sure be made prettier. It's only purpose is to get the brain nudged into the right direction. | |
| """ | |
| BADWORDS = { | |
| u'bad': u'b*d', | |
| u'verybad': u'v*****d', | |
| u'disgusting': u'#*$&^$%' |
| Buildfile: /home/exhuma/work/__libs__/plovr/build.xml | |
| pre-compile: | |
| compile: | |
| [mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/classes | |
| [mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles | |
| [mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles/com/google/template/soy/exprparse | |
| [mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles/com/google/template/soy/soyparse | |
| [javacc] Java Compiler Compiler Version 5.0 (Parser Generator) |