This file contains hidden or 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 | |
kill -9 `ps ax | grep PeepOpen | grep -v grep | awk '{print $1}'` | |
kill -9 `ps ax | grep TextMate | grep -v grep | awk '{print $1}'` | |
open /Applications/PeepOpen.app | |
echo restarted Peepopen, killed TextMate |
This file contains hidden or 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
---A Method in Test_helper.rb | |
def login_pmtwo | |
u=User.new(:login =>"pmtwo",:password =>"secret",:administrator =>true) | |
post :login, :login=>'pmtwo', :password=>'secret' | |
end | |
---:projects_controller.rb | |
require File.dirname(__FILE__) + '/../test_helper' | |
class ProjectsControllerTest < ActionController::TestCase |
This file contains hidden or 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
#from application.dryml | |
<extend tag="new-page" for="Location"> | |
<old-new-page merge> | |
<append-content-header:> | |
<div class="csvload"> | |
<% form_for :dump, :url=>{:controller=>"locations", :action=>"create"}, :html => { :multipart => true } do |f| -%> | |
<%# form_tag '/upload', :html=>{:multipart =>true} %> | |
<label for="dump_file">CSV File:</label> | |
<%= file_field(:file, :file, :class => 'file_input')%> | |
<%= submit_tag 'Upload' -%> <br /> |
This file contains hidden or 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 LocationsController < ApplicationController | |
hobo_model_controller | |
auto_actions :all | |
require 'csv' | |
web_method :csvimport | |
def csvimport |
This file contains hidden or 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
#location controller | |
require 'csv' | |
web_method :csvimport do | |
def csvimport | |
unless params[:dump].nil? | |
@parsed_file=CSV::Reader.parse(params[:dump][:file]) | |
n=0 | |
@parsed_file.each do |row| | |
loc=Location.new |
This file contains hidden or 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
a { | |
color: #3256B6; | |
} | |
a:visited { | |
color: #cc9; | |
} | |
a:hover, a:visited:hover { | |
color: #e00; | |
text-decoration: none; | |
} |
This file contains hidden or 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
sel | |
day_date | |
,sum (xv_com_all.csb_subscriber_ga_disc.dly_gross_adds + xv_com_all.csb_subscriber_ga_disc.dly_reconnections) | |
from xv_com_all.csb_subscriber_ga_disc | |
where day_date between 1080801 and 1080818 | |
and service_provider_id = 1 | |
group by 1 |
NewerOlder