Firefox
Set default home page
edit /etc/firefox/syspref.js
At the bottom of the file add:
user_pref("browser.startup.homepage", "http://google.com");
Obviously change "http://google.com" to the page of your choice (or not).
| # Tasks to start/stop/restart a daemonized clockwork instance | |
| namespace :clockwork do | |
| desc "Start clockwork" | |
| task :start, :roles => [:app] do | |
| run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec clockworkd -c #{current_path}/config/clock.rb --pid-dir #{shared_path}/pids --log --log-dir #{shared_path}/log start" | |
| end | |
| task :stop, :roles => [:app] do | |
| run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec clockworkd -c #{current_path}/config/clock.rb --pid-dir #{shared_path}/pids --log --log-dir #{shared_path}/log stop" | |
| end |
| sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" |
| import collections | |
| import functools | |
| def lru_cache(maxsize=100): | |
| '''Least-recently-used cache decorator. | |
| Arguments to the cached function must be hashable. | |
| Cache performance statistics stored in f.hits and f.misses. | |
| http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used |
| #!/bin/bash | |
| lsb_release -sc |
| dpkg --compare-versions "1.0.11~rc1" gt "1.0-10" && echo "1.0-11 greater than RC" |
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import signal | |
| if __name__ == "__main__": | |
| print "sending signal, pid="+repr(sys.argv[1]) | |
| os.kill(int(sys.argv[1]), signal.SIGUSR1) |
| #!/bin/bash | |
| wget -r -q -nH --cut-dirs=2 --no-parent --reject="index.html*" http://mysite.com/dir1/dir2/data |
| require 'octokit' | |
| require 'csv' | |
| require 'date' | |
| # Github credentials to access your private project | |
| USERNAME="USER_NAME" | |
| PASSWORD="SEKRIT" | |
| # Project you want to export issues from | |
| USER="REPO_OWNER" | |
| PROJECT="REPO_NAME" |
| class ComparableMixin(object): | |
| def _compare(self, other, method): | |
| try: | |
| return method(self._cmpkey(), other._cmpkey()) | |
| except (AttributeError, TypeError): | |
| raise NotImplementedError("_cmpkey not implemented") | |
| def __lt__(self, other): | |
| return self._compare(other, lambda s,o: s < o) |
Firefox
Set default home page
edit /etc/firefox/syspref.js
At the bottom of the file add:
user_pref("browser.startup.homepage", "http://google.com");
Obviously change "http://google.com" to the page of your choice (or not).