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
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 |
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
a { | |
color: #3256B6; | |
} | |
a:visited { | |
color: #cc9; | |
} | |
a:hover, a:visited:hover { | |
color: #e00; | |
text-decoration: none; | |
} |
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
#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 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 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 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 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 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
person.rb methods | |
def self.initMailchimpList | |
#do the initial sync of all people in the DB for a customer with | |
#pushing it into one list | |
end | |
def syncMailchimpList | |
# we need the mailchimp api key on hotel level | |
# get the structure of the list | |
# see if we have the person in the mailchimp list |
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
// onLoad Syntax with calling jQuery in "Person" | |
jQuery(function() { | |
var cheight=$("#content").height(); | |
var nheight=$("#navbar").height(); | |
if (cheight>nheight) { | |
$("#navbar").height(cheight); | |
} | |
}); | |
// same as above, more terse, we assume jQuery loaded |
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
These are the code parts to grab related to this blog post. | |
Read more about it there | |
http://www.igumbi.com/en/blog/YAML-to-JSON-Rails-for-i18n-Language-Files | |
# The locale file structure de.yml | |
de: | |
obt: |
OlderNewer