Skip to content

Instantly share code, notes, and snippets.

View rubystar's full-sized avatar

Venkata Reddy Bhavanam rubystar

View GitHub Profile
@rubystar
rubystar / gist:5107734
Created March 7, 2013 12:34
conflicts html generation code to helpers
[venkatab@pnwsdes053 redzone]$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: RZ-3594 - As a developer, I want to develop and implement a strategy for removing html generation code from models
Using index info to reconstruct a base tree...
<stdin>:83: trailing whitespace.
("On #{adjustment.created_at.to_s(:date)}, #{adjustment.user.name} changed #{adjustment.stat_column} from #{adjustment.formatted_original_value} to #{adjustment.formatted_value} for these dimensions: " +
<stdin>:86: trailing whitespace.
<stdin>:182: trailing whitespace.
@rubystar
rubystar / gist:5291955
Created April 2, 2013 12:48
import mpr
class Plan < ActiveRecord::Base
include Roo
def self.import
s = Excelx.new("#{Rails.root}/db/data/simple_media_plan.xlsx")
table_start_row_no = s.first_row
table_end_row_no = s.last_row
# Find the start and end row of the table
s.first_row.upto(s.last_row) do |line|
1) Create an Apex Class
Steps: Click Your Name | Setup | Develop | Apex Classes and click New.
Paste the following code there.
global class asyncApex {
@future (callout=true)
public static void processAccount(Id accountId) {
@rubystar
rubystar / solr schema.xml
Created June 7, 2013 07:01
partilal solr search
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@rubystar
rubystar / UI rebase on 18th June
Created June 18, 2013 10:21
UI rebase on 18th June
[venkatab@PNWSDES053 redzone]$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: RZ-3203 - As a developer, I want to migrate the remaining ERB views to HAML
Using index info to reconstruct a base tree...
<stdin>:679: trailing whitespace.
<stdin>:2746: trailing whitespace.
warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
@rubystar
rubystar / RZ-3179 rebase
Created September 24, 2013 12:12
RZ-3179 rebase
[venkatab@PNWSDES053 redzone]$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: RZ-3810 -- As a System, I should use Zendesk for all issue tracking.
Using index info to reconstruct a base tree...
<stdin>:260: trailing whitespace.
@search = Sunspot.search Department, Agency, Advertiser, Publisher, Campaign, Site, Zone, User, SalesRep, Company, Market, DeliveryReportTemplate do |query|
<stdin>:343: trailing whitespace.
:geo_target, :geo_target_group, :geo_target_group_geo_target, :global_config, :search_keyword,
<stdin>:1009: trailing whitespace.
Account Name: アビームコンサルティング株式会社
Bundle Name: 神奈川県
@rubystar
rubystar / state structure
Last active July 4, 2017 08:08
redux state structure
//Widgets
{
byId: {
1: {
settings:{name: 'report 1', description: 'report 1 desc'},
child_widget_ids: [10, 11]
},
2: {
settings:{name: 'report 2', description: 'report 2 desc'},
child_widget_ids: [12, 13]
@rubystar
rubystar / report prop structure
Created July 17, 2017 07:45
data as a report prop for rendering a report
// prepare this inside the container component
report: {
id: 1,
allOtherKeys: "values", // keep all the required report(widget) data at first level
charts: [
{
id: 11,
settings: {
@rubystar
rubystar / redis_record.rb
Created October 26, 2017 13:30
Redis record
require "redis"
$redis = Redis.new
class ReportExport
attr_reader :id
def initialize
@id = SecureRandom.uuid
end