Skip to content

Instantly share code, notes, and snippets.

Ian Whitney IanWhitney

View GitHub Profile
View zk_role.md
View Dors_to_json.md
  • Head to the confluent directory, prep
    • cd /Users/Ian/Downloads/confluent-3.3.0
    • export PATH=/Users/Ian/Downloads/confluent-3.3.0/bin:$PATH
  • Start up the relevant Confluent stuff
    • clear && ./bin/connect-standalone ./etc/schema-registry/connect-avro-standalone.properties ./etc/kafka-connect-jdbc/source-dors.properties
  • Run your standalone connector
    • clear && ./bin/connect-standalone ./etc/schema-registry/connect-avro-standalone.properties ./etc/kafka-connect-jdbc/source-dors.properties
  • Wait a minute or two for the connector to get up & running
  • You can run a console consumer just to see if there's stuff in the topic
    • --bootstrap-server localhost:9092 --topic test-dors-jdbc-v_reg_total --from-beginning
View tech_people_aloha.json
[
{
"text": "Hi there, new person! Some tips now that you've joined this fantastic Slack.\n• Introduce yourself on #general so that we can say Hi.\n• Check out our growing Channel list. Big ones will be #code-people, #net-people or #web-people. #random is good for...randomness.\n• If you’re an IT manager & want to talk people-skill stuff, ask @codyh for an invite to #people-people\n• Channels are free. Create one if you want to talk about some topic! Let us know about the new channel in #general\n• Fill out your profile with where you work/what you do\n • https://get.slack.help/hc/en-us/articles/204092246-Edit-your-profile"
}
]
@IanWhitney
IanWhitney / 01_summary.md
Last active May 28, 2017
Testing the removal of the single-column etl_audit_id indexes in FAC_CR tables
View 01_summary.md

Testing the removal of the the single-column index E_AUDITS_F_CR_DA_FK_1 because the column it indexes etl_audit_id is also the first column in a multi-column index.

Plan

select * from fac_cr_degree_applicable where etl_audit_id = '13869193';

With the single-column index on, the single-column index is used and the cost is 3.

With the single-column index disabled, the multi-column indexx is used and the cost is 3.

@IanWhitney
IanWhitney / faculty_roles.sql
Last active Mar 1, 2017
To satisfy INC1581454.
View faculty_roles.sql
/*
I am preparing a communication to send out to graduate faculty in the following colleges:
CEHD (06GRD, 06DMS)
CFANS (30GRD)
CVM (03GRD)
CSOM (02GRD)
Would it be possible to query the Faculty Role List database to get a list of graduate faculty from the above colleges including
active faculty, name, program (college), and email address?
*/
@IanWhitney
IanWhitney / classify_jobs.rb
Last active May 9, 2017
sidekiq job classification
View classify_jobs.rb
def classify_jobs(queue = 'default')
hsh = Hash.new{|hsh, key| hsh[key] = 0}
Sidekiq::Queue.new(queue).each do |j|
hsh[j.klass] += 1
end
puts hsh if hsh.values.any?(&:present?)
end
View data_views.rb
module DataViews
def self.root
@root ||= File.expand_path(File.join("..", ".."), __FILE__)
end
def self.environment
@environment ||= Rails.env || "development"
end
def self.environment=(other)
View queen_tests.txt
Clojure
Empty board
Board comparison
Attacking
C++
Can't occupy same space
Attacking
ECMA
View rust_question.md
View multi_role_registry.rb
# Referenced in Design Is Refactoring post http://designisrefactoring.com/2016/02/03/factories/
# This code takes the previous example and extends it. Classes can now define 'roles' they satisfy
# and each class can satisfy more than one role.
#
# At load time, these roles are examined and recorded in registries.
# In this example there's a CampusLikeRegistry that contains every class that says it's campus-like.
# But you could have any number of registries.
require 'singleton'
require 'forwardable'
You can’t perform that action at this time.