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
require 'find' | |
namespace :db do | |
desc "Backup the database to a file. Options: DIR=base_dir RAILS_ENV=production MAX=20" | |
task :backup => [:environment] do | |
datestamp = Time.now.strftime("%Y-%m-%d_%H-%M-%S") | |
base_path = ENV["DIR"] || "db" | |
backup_base = File.join(base_path, 'backup') | |
backup_folder = File.join(backup_base, datestamp) | |
backup_file = File.join(backup_folder, "#{RAILS_ENV}_dump.sql.gz") |
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 | |
## | |
# .bash_extras | |
# | |
# bash profile customizations. Just source this file to get things rolling! | |
## | |
# [damien@Protos:/etc] 21:00:20 $ | |
export PS1='[\[\033[36m\]\u@\h\[\033[31m\]:\[\033[33m\]\w\[\033[0m\]] \[\033[35m\]\D{%H:%M:%S}\[\033[0m\] \$ ' |
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
require 'net/http' | |
require 'rexml/document' | |
puts "Enter your zip code to get today's forecast" | |
print "Zip: " | |
zip = gets.chomp | |
if (zip.nil? or zip == 0) | |
puts "Invalid zip, program exiting." |
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
<?php | |
/** Development settings. | |
* | |
* These are some customs settings that allow us to import arbitrary WordPress | |
* databases and run them within our development environment without any additional | |
* configuration. Append this to your regular wp-config.php file and customize as needed. | |
* | |
* @link http://gist.github.com/gists/173574 | |
*/ |
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
# | |
# = Capistrano database.yml task | |
# | |
# Provides a couple of tasks for creating the database.yml | |
# configuration file dynamically when deploy:setup is run. | |
# | |
# Category:: Capistrano | |
# Package:: Database | |
# Author:: Simone Carletti <[email protected]> | |
# Copyright:: 2007-2009 The Authors |
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
%div.alert= flash[:alert] |
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
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require File.expand_path('../config/application', __FILE__) | |
require 'rake' | |
require 'resque/tasks' | |
Rails::Application.load_tasks |
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
def next_event | |
event = NeoEvent.first( | |
:starts_at.gt => Time.now, | |
:cancelled => false, | |
:order => [ :starts_at.asc ]).starts_at | |
"<time datetime='#{event.strftime}'>#{event.strftime('%I:%M %p PST')}</time>" | |
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
/Users/damien/.rvm/gems/ruby-1.8.7-p174@vokle/gems/dm-core-0.10.2/lib/dm-core/model/relationship.rb:381:in `method_missing': undefined local variable or method `is_paginated' for Occurrence:Class (NameError) | |
from /Users/damien/.rvm/gems/ruby-1.8.7-p174@vokle/gems/dm-core-0.10.2/lib/dm-core/model/property.rb:239:in `method_missing' | |
from /Users/damien/p/vokle-legacy/lib/vokle/models/occurrence.rb:190 | |
from /Users/damien/p/vokle-legacy/lib/vokle/base.rb:72:in `require' | |
from /Users/damien/p/vokle-legacy/lib/vokle/base.rb:72:in `load' | |
from /Users/damien/p/vokle-legacy/lib/vokle/base.rb:72:in `each' | |
from /Users/damien/p/vokle-legacy/lib/vokle/base.rb:72:in `load' | |
from /Users/damien/p/vokle-legacy/lib/vokle.rb:47 | |
from /Users/damien/p/vokle-legacy/config/init.rb:35:in `require' | |
from /Users/damien/p/vokle-legacy/config/init.rb:35 |
OlderNewer