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
require_relative "./lib/erubi.rb" | |
require "memory_profiler" | |
require "digest/md5" | |
erb = File.read("./template.html.erb") | |
report = MemoryProfiler.report do | |
Erubi::Engine.new(erb).src | |
end | |
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
require "benchmark/ips" | |
require "benchmark/memory" | |
require_relative "lib/message_bus.rb" | |
str = "1|1|/foo|{\"data\":\"םוֹלשָׁ\",\"user_ids\":null,\"group_ids\":null,\"client_ids\":null}".freeze | |
Benchmark.ips do |b| | |
b.report("decode1") do | |
MessageBus::Message.decode(str) | |
end |
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
require "benchmark/ips" | |
$LOAD_PATH.push File.expand_path("./lib") | |
require_relative "./lib/arbre.rb" | |
if ENV['SECOND_RUN'] | |
class ::Arbre::Element | |
include BuilderMethods | |
attr_reader :arbre_context | |
def initialize(arbre_context = Arbre::Context.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
require "benchmark/ips" | |
$LOAD_PATH.push File.expand_path("./lib") | |
require_relative "./lib/arbre.rb" | |
if ENV['SECOND_RUN'] | |
class ::Arbre::Context < ::Arbre::Element | |
def initialize(assigns = nil, helpers = nil, &block) | |
assigns = (assigns || {}).symbolize_keys! | |
@_assigns = assigns |
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
missing =CSV.read("/home/deploy/missing_debits_from_june8th.csv");nil | |
key= BunchBall.session_key | |
start_date = Time.parse("2015-06-01").to_i | |
end_date = Time.parse("2015-06-30").to_i | |
missing.shift #user_id, debit | |
#125672 | |
def get_all_history(options) | |
params = { | |
:method => 'user.getPointsHistory', |
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
#! /usr/bin/env python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
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
require 'mechanize' | |
URL_FILE = "qc_urls" | |
OUTPUT_FILE = "qc_urls_out" | |
class QuantcastCrawler | |
def initialize(file_path, output_path) | |
@file_path = file_path | |
@output_path = output_path | |
end |
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
diff --git a/Procfile b/Procfile | |
new file mode 100644 | |
index 0000000..125d0f9 | |
--- /dev/null | |
+++ b/Procfile | |
@@ -0,0 +1 @@ | |
+unicorn: exec bundle exec unicorn_rails -c config/unicorn.rb -D | |
diff --git a/config/deploy.rb b/config/deploy.rb | |
index 180bf39..2a77bb7 100644 | |
--- a/config/deploy.rb |
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
diff --git a/app/assets/apps/web/appointment_booking/controllers/appointment_chooser.js b/app/assets/apps/web/appointment_booking/controllers/appointment_chooser.js | |
index 15027c9..32db08c 100644 | |
--- a/app/assets/apps/web/appointment_booking/controllers/appointment_chooser.js | |
+++ b/app/assets/apps/web/appointment_booking/controllers/appointment_chooser.js | |
@@ -335,6 +335,7 @@ | |
apptTime.setSeconds(secondsOffset); | |
this.appointments.push({ | |
+ remoteAppointmentSlotId: 42, | |
dateTime: formatDate(apptTime, "yyyy-mm-dd hh:MM tt"), |
NewerOlder