The squeeky-clean way with homebrew and pip/virtualenv.
$ easy_install pip
$ pip install virtualenvwrapper mercurial
$ brew install gfortran && brew install pyqt
# Have a nice long coffee break -- compiling Qt took 67 minutes on my
| # -*- coding: utf-8 -*- | |
| import os | |
| gettext = lambda s: s | |
| PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) | |
| DEBUG = True | |
| TEMPLATE_DEBUG = DEBUG |
| <html> | |
| <head> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| $('#button').click(function() { | |
| FOO.trigger('buttonPushed', {bar:32}); |
| Taken from http://stackoverflow.com/questions/244243/how-to-reset-postgres-primary-key-sequence-when-it-falls-out-of-sync. | |
| --drop function IF EXISTS reset_sequence (text,text) RESTRICT; | |
| CREATE OR REPLACE FUNCTION "reset_sequence" (tablename text,columnname text) RETURNS bigint --"pg_catalog"."void" | |
| AS | |
| $body$ | |
| DECLARE seqname character varying; | |
| c integer; | |
| BEGIN | |
| select tablename || '_' || columnname || '_seq' into seqname; |
The squeeky-clean way with homebrew and pip/virtualenv.
$ easy_install pip
$ pip install virtualenvwrapper mercurial
$ brew install gfortran && brew install pyqt
# Have a nice long coffee break -- compiling Qt took 67 minutes on my
| require "rspec/core/formatters/base_text_formatter" | |
| class ProgressWithNames < RSpec::Core::Formatters::BaseTextFormatter | |
| def example_passed(example) | |
| super(example) | |
| output.print green(".") | |
| end | |
| def example_pending(example) | |
| super(example) |
| # When testing a rails website on my local development machine, I found my | |
| # Parallel's VM wouldn't load 0.0.0.0:3000, 127.0.0.1, or localhost:3000. | |
| # | |
| # So I tried using my computers IP address and voila. I thought I'd hone | |
| # my bash chops a little and extract the IP address with the port number | |
| # concatenated to it. This command puts that on the clipboard so I can just | |
| # paste it into IE so I could browser test. | |
| # | |
| # NOTE: the pbcopy command is Mac specific. | |
| # |
| # ~/.osx — http://mths.be/osx | |
| ############################################################################### | |
| # General UI/UX # | |
| ############################################################################### | |
| # Set computer name (as done via System Preferences → Sharing) | |
| scutil --set ComputerName "MacBookPro" | |
| scutil --set HostName "MacBookPro" | |
| scutil --set LocalHostName "MacBookPro" |
| #!/usr/bin/env bash | |
| if [[ -n $1 ]] | |
| then | |
| RAKE_PATH=`bundle show rake` | |
| ruby -I"lib:test:${KATELLO_PATH}/test:${KATELLO_PATH}/spec" -I"${RAKE_PATH}/lib" \ | |
| "${RAKE_PATH}/lib/rake/rake_test_loader.rb" $@ ${KATELLO_PATH}/test/katello_test_runner.rb | |
| else | |
| bundle exec rake test:katello | |
| fi |
| #!/usr/bin/env bash | |
| set -e | |
| if [[ -z $1 ]]; then | |
| tmux switch-client -l | |
| else | |
| tmux switch-client -t "$1" | |
| fi |
| module HashConverter | |
| class << self | |
| def to_underscore hash | |
| convert hash, :underscore | |
| end | |
| def to_camel_case hash | |
| convert hash, :camelize, :lower | |
| end | |
| def convert obj, *method | |
| case obj |