Skip to content

Instantly share code, notes, and snippets.

View kennethjohnbalgos's full-sized avatar

Kenneth John kennethjohnbalgos

View GitHub Profile
@kennethjohnbalgos
kennethjohnbalgos / gist:10446161
Last active August 29, 2015 13:59
MissionHub Summer Project Import 1 [Staging]
-- Checking Ministry - Athletes In Action
---- Importing Projects 2014...
-- Checking Ministry - Cru High School
---- Importing Projects 2014...
-- Checking Ministry - Campus Field Ministry
---- Importing Regions...
------ Checking Region - GL - Great Lakes
-------- Importing Projects 2014...
---------- Checking Project - 2014 - CRU ABROAD: Haiti (Fall Semester 2012)
------ Checking Region - GP - Great Plains
class Shopping
ICON_URL = "http://www.google.com/s2/favicons?domain="
# Metro Deal
METRODEAL_URL = "http://www.metrodeal.com/"
METRODEAL_SURL = "#{METRODEAL_URL}catalog/?q="
def self.metrodeal(page)
items = Array.new
page.css("body div.deals-content .deals-item-container").each do |data|
items << metrodeal_info(data)
end
:javascript
var switchTo5x=true;
var isFirefox = typeof InstallTrigger !== 'undefined';
var isChromium = window.chrome,
vendorName = window.navigator.vendor;
var isChromeActive = (isChromium !== null && isChromium !== undefined && vendorName === "Google Inc.");
<<<<<<< HEAD
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
INSERT INTO `lesson_types` (`id`, `account_id`, `name`, `created_at`, `updated_at`)
VALUES
(1, 0, 'eLearning Lesson', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
(2, 0, 'SCORM', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
(3, 0, 'Webinar', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
(4, 0, 'Recording', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
(5, 0, 'Self-study', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
(6, 0, 'White Paper', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
(7, 0, 'Project', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
(8, 0, 'Mentoring', '2014-09-06 08:39:07', '2014-09-06 08:39:07'),
{
"person": {
"interactions": [
{
"interaction_type_id": 1,
"created_by_id": 55270,
"privacy_setting": "organization",
"updated_at": "2012-11-18T04:10:46+08:00",
"initiator_ids": [
-- Checking Ministry - Athletes In Action
---- Importing Projects 2014...
---- Importing Projects 2015...
------ Checking Project - 2015 - South Asia Project
------ Checking Project - 2015 - South Korea
-- Checking Ministry - Bridges
---- Importing Projects 2014...
---- Importing Projects 2015...
------ Checking Project - 2015 - Bridges Chinese Trek - Boston
------ Checking Project - 2015 - Bridges Chinese Trek - East Asia
@kennethjohnbalgos
kennethjohnbalgos / trend_tracker_process
Created March 25, 2015 08:32
/charts/update_trend_movements
Started POST "/charts/update_trend_movements" for 127.0.0.1 at 2015-03-25 16:28:50 +0800
Processing by ChartsController#update_trend_movements as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"Mnv8ruZDOi5a+Yr41lN2Hu2UIroqwkhAaKyv4syu6ho=", "all"=>"false", "movements"=>["7151", "7138", "7013", "7175", "7176", "7177", "7178", "5994", "7868", "5570", "7536", "7537", "7538", "7834", "7395", "6708", "7164", "8261", "8262", "8265", "8266", "8267", "7686", "8259", "8260"], "start_date"=>"2014-11-01", "end_date"=>"2014-11-30", "commit"=>"Update Chart"}
User Load (1.8ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2200843 LIMIT 1
Person Load (1.6ms) SELECT `people`.* FROM `people` WHERE `people`.`user_id` = 2200843 LIMIT 1
Chart Load (1.6ms) SELECT `charts`.* FROM `charts` WHERE `charts`.`person_id` = 2370365 AND (chart_type = 'trend') LIMIT 1
ChartOrganization Load (15.7ms) SELECT `chart_organizations`.* FROM `chart_organizations` WHERE `chart_organizations`.`chart_id` = 1019
EXPLAIN (1.8m
def refresh_trend_data
@begin_date = (Date.today - 3.months).end_of_week(:sunday)
@end_date = Date.today.end_of_week(:sunday)
@begin_date = @chart.trend_start_date.end_of_week(:sunday) if @chart.trend_start_date
@end_date = @chart.trend_end_date.end_of_week(:sunday) if @chart.trend_end_date
if @chart.trend_all_movements
@displayed_movements = @movements
else
{
"data_version":15,
"about":{
"title":"About",
"content":"Quantimetrix, a family business since 1974, has been very busy handcrafting world-class, ready-to-use laboratory quality control products such as: urinalysis controls, spinal fluid controls, pediatric bilirubin controls, diabetes controls. We’ve earned a trusted reputation for superior quality and great customer service. Our product portfolio includes: Dipper®, Dropper®, Dropper® Plus, QuanTscopics®, and Dip&Spin®. They are compatible with most major laboratory and POCT analyzers including Siemens, IRIS, Beckman Coulter, Roche and many more. Our Lipoprint® Lipoprotein Subfractions Testing System is the only test that measures LDL & HDL subfraction cholesterol and is used in clinical & research laboratories providing useful information in the risk assessment for atherosclerotic disease.<br/><br/>Every Quantimetrix team member embodies the iQi core values: Integrity, Quality, and Innovation. We maintain the highest standards in our produ
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
std_trap = trap("INT") { exit! 130 } # no backtrace thanks
HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE']
if ARGV == %w{--prefix}
puts File.dirname(File.dirname(HOMEBREW_BREW_FILE))
exit 0
end