Skip to content

Instantly share code, notes, and snippets.

View briandonahue's full-sized avatar

Brian Donahue briandonahue

View GitHub Profile
public class Stupid{
public void DoSomething(){
}
}
public class Stupid{
public void DoSomething(){
}
}
def expand_template( template_file, output_file)
puts "Building #{output_file}"
template = File.open(template_file, "r")
output = File.open(output_file, "w")
template.each_line do |template_line|
template_line.gsub(/@([^@]+)@/) do |token|
value = @config[$1.downcase]
unless value.nil?
@config = YAML::load_file "local.properties.yml"
require 'yaml'
require 'fileutils'
@config = YAML::load_file "local.properties.yml"
desc "Building config files from templates..."
task :expand_template_files do
expand_template(WEBSITE_CONFIG_TEMPLATE, WEBSITE_SRC + "web.config")
end
require 'Albacore'
require 'fileutils'
class DeepCopy
include Logging
attr_accessor :source_dir, :dest_dir, :extensions, :includes, :excludes
def initialize
super()
require 'fileutils'
require 'Rake'
class SmartFileList < Rake::FileList
attr_accessor :base_path
def initialize(base_path)
super()
@base_path = base_path.sub(%r{/$}, "")
end
public class MyViewController: UIViewController{
//DO THIS
UIAlertView alertView; // class level variable
public void ShowAlertView(){
// NOT THIS
// var alertView = new UIAlertView; // This is a local variable
alertView = new UIAlertView();
}
using System;
using MonoTouch;
using MonoTouch.UIKit;
using System.Drawing;
using MonoTouch.Foundation;
using System.Text;
using System.IO;
namespace MRB
{
dc = DeepCopy.new
dc.extensions = ["dll", "aspx", "ascx", "svc", "asmx", "ashx", "asax", "config", "xap",
"resx", "jpg", "gif", "png", "css", "js", "swf", "lic", "xml", "master",
"dic", "txt", "htm"]
dc.excludes = ["obj/**", "upload/**"]
dc.source_dir = web_src
dc.dest_dir = deploy_target
dc.copy