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
Jakes-MacBook-Pro:Scripted jakekring$ bundle install | |
Fetching gem metadata from http://rubygems.org/....... | |
You have requested: | |
json ~> 1.7.7 | |
The bundle currently has json locked at 1.5.5. | |
Try running `bundle update json` | |
Jakes-MacBook-Pro:Scripted jakekring$ bundle update json | |
Fetching gem metadata from http://rubygems.org/....... | |
Bundler could not find compatible versions for gem "json": |
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
var BUFFER = $(window).height() - $("#box").height(); | |
$(window).scroll(function(){ | |
$(window).scrollTop() > BUFFER ? $("#box").hide() : $("#box").show(); | |
}); |
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
Traceback (most recent call last): | |
File "starter.py", line 31, in <module> | |
seed() | |
File "starter.py", line 25, in seed | |
flat_docs = load_flat_docs('jobs.txt') | |
File "starter.py", line 14, in load_flat_docs | |
return [ruby_to_python(doc) for doc in open(filename).readlines()] | |
File "starter.py", line 10, in ruby_to_python | |
python_dict = eval(sub) | |
File "<string>", line 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
b.finished_jobs.where(id: { "$nin" => ids }).each do |j| | |
d = j.document | |
puts "scripted.com/documents/show/#{ d.id }" | |
d.save_file("Cleaned Up") | |
@new_c = [] | |
d.content.each do |c| | |
begin | |
c.gsub!("\n", " ") | |
c.strip! | |
@splitup = c.split(">") |
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
misc_writers = Hash.new(0) | |
adj_writers = [] | |
b.finished_jobs.each do |f| | |
p = Payment.where("prescreened_jobs.#{ f.id }" => {"$ne" => nil }).first | |
if p | |
unless p.prescreened_jobs[f.id.to_s] == 15 | |
if p.paid | |
current_p = Payment.current(p.writer) | |
adding = (15 - p.prescreened_jobs[f.id.to_s]) | |
current_p.misc += adding |
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
self.loadRev = function(){ | |
console.log("loading rev"); | |
console.log(self.id); | |
console.log(self.shownRevision().index); | |
$.get("/documents/load_rev",{ | |
id:self.id, | |
rev:self.shownRevision().index | |
}, | |
function(d){ | |
console.dir(d); |
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
fm = business.format_meta[batch.finished_jobs.first.format_id.to_s] | |
puts (["Prompt"] + fm).join("\t") | |
batch.finished_jobs.each do |j| | |
@out ||= [] | |
j.document.content.each_with_index do |c, i| | |
if i % fm.size == 0 | |
puts @out.join("\t") | |
@out = [j.prompts[i / fm.size]] | |
end | |
@out << c |
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
# i'm almost certain that if you refactored this | |
every 1.day, :at => '4:30 am' do | |
if DateTime.now.end_of_month == DateTime.now | |
rake "cull_payments" | |
end | |
end | |
every 1.day, :at => '4:30 am' do | |
if DateTime.now.day == 15 |
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
$(".content-editor").bind('paste', function(e) { | |
var el = $(this); | |
setTimeout(function() { | |
var strippedContent = $(el).html().replace(/(\r\n|\n|\r)/gm," "); | |
$(el).html(strippedContent); | |
}, 0); | |
}); |
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
commit 956c05116cc0a5866fb492acbe50f7b0dfec23f9 | |
Author: Jake Kring <kringj@gmail.com> | |
Date: Wed Jan 9 16:40:55 2013 -0800 | |
minor fix for sylvains punctuation bug | |
commit a22cbd175c4cb8715bcb2c7a1aa0b7941aa2f50e | |
Author: Jake Kring <kringj@gmail.com> | |
Date: Wed Jan 9 15:50:35 2013 -0800 |