This file contains 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
#!/usr/bin/env ruby | |
require 'trac4r' | |
require 'active_record' | |
TIME_FILE = "/var/tmp/mpwa-sync" | |
NEW_PORTS = "/Users/joe/Dev/gsoc10-mpwa/bin/new-ports" | |
PORT_INDEX = "/opt/local/var/macports/sources/rsync.macports.org/release/ports" | |
RAILS_ROOT = "/Users/joe/Dev/gsoc10-mpwa/mpwa" | |
require File.expand_path(RAILS_ROOT + '/app/models/category.rb', __FILE__) |
This file contains 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
#!/usr/bin/env ruby | |
require 'trac4r' | |
require 'active_record' | |
TIME_FILE = "/var/tmp/mpwa-sync" | |
NEW_PORTS = "/Users/joe/Dev/gsoc10-mpwa/bin/new-ports" | |
PORT_INDEX = "/opt/local/var/macports/sources/rsync.macports.org/release/ports" | |
RAILS_ROOT = "/Users/joe/Dev/gsoc10-mpwa/mpwa" | |
OPEN_STATUSES = ['new', 'reopened', 'assigned'] | |
db_info = YAML.load_file(File.expand_path(RAILS_ROOT + '/config/database.yml', __FILE__)) |
This file contains 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
#!/usr/bin/env ruby | |
require 'trac4r' | |
require 'active_record' | |
TIME_FILE = "/var/tmp/mpwa-sync" | |
NEW_PORTS = "/Users/joe/Dev/gsoc10-mpwa/bin/new-ports" | |
PORT_INDEX = "/opt/local/var/macports/sources/rsync.macports.org/release/ports" | |
RAILS_ROOT = "/Users/joe/Dev/gsoc10-mpwa/mpwa" | |
OPEN_STATUSES = ['new', 'reopened', 'assigned'] | |
db_info = YAML.load_file(File.expand_path(RAILS_ROOT + '/config/database.yml', __FILE__)) |
This file contains 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
class Port < ActiveRecord::Base | |
has_many :port_dependencies | |
has_many :dependencies, :through => :port_dependencies | |
has_many :comments | |
has_many :tickets | |
has_one :category | |
belongs_to :category | |
def self.search(criteria, val, page) | |
paginate :per_page => 50, :page => page, :conditions => ["#{self.columns_hash[criteria].name} like ?", "%#{val}%"], :order => 'name ASC' |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <mach/mach_init.h> | |
#include <mach/mach_types.h> | |
#include <mach/x86_64/task.h> | |
#include <mach/x86_64/thread_act.h> | |
#include <mach/mach_traps.h> | |
void print_usage(char *); |
This file contains 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
############################################################################## | |
# | |
# Hidden license | |
# | |
# By reading the source code of this file, you're automatically agreeing | |
# with the following conditions: | |
# | |
# 1. You will sell your soul to us for $0. | |
# 2. You will watch the movie "Hot Fuzz". | |
# |
This file contains 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
5.times {|x| puts x} | |
5.times do |x| | |
puts x | |
end | |
func = lambda {|x| puts x} | |
5.times {|x| func.call(x)} |
This file contains 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
source 'http://rubygems.org' | |
gem 'rails', '3.0.0' | |
gem 'recaptcha', :require => "recaptcha/rails" | |
gem 'will_paginate', '3.0.pre2' | |
group :development, :test do | |
gem 'sqlite3' | |
end |
This file contains 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
#!/bin/bash | |
export PATH=$HOME/bin:/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:$PATH | |
export LC_CTYPE=en_US.UTF-8 | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "("${ref#refs/heads/}")" | |
} | |
#prompt |
This file contains 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
"Load Bunldes with Pathogen | |
call pathogen#runtime_append_all_bundles() | |
" Auto Commands | |
if has("autocmd") | |
" enable filetype detection | |
filetype plugin indent on | |
autocmd BufReadPost * | |
\ if line("'\"") > 1 && line("'\"") <= line("$") | |
OlderNewer