PHP South West UK
...
UK
| obj = | |
| init: -> | |
| @keirsform = $('form.keirform') # could be a wrapper further up, or maybe even the document | |
| # - just something that doesn't get swapped in or out is easiest | |
| @keirsform.on 'click', '.form__item__remove', (e) => | |
| e.preventDefault() | |
| @removeURL $(e.currentTarget) | |
| removeURL: ($link) -> |
| select | |
| x.*, | |
| a.body_words as previous_body_words, | |
| b.body_words as body_words, | |
| (coalesce(b.body_words, 0) - coalesce(a.body_words, 0)) as body_words_diff, | |
| a.article_words as previous_article_words, | |
| b.article_words as article_words, | |
| (coalesce(b.article_words, 0) - coalesce(a.article_words, 0)) as article_words_diff, |
| select | |
| max(x.previous_crawl_id) as previous_crawl_id, | |
| x.crawl_id, | |
| max(x.previous_crawl_date) as previous_crawl_date, | |
| x.crawl_date, | |
| max(a.body_words_total) as previous_body_words_total, | |
| max(b.body_words_total) as body_words_total, | |
| (max(b.body_words_total) - max(a.body_words_total)) as body_words_diff, | |
| max(a.article_words_total) as previous_article_words_total, | |
| max(b.article_words_total) as article_words_total, |
| select | |
| max(x.previous_crawl_id) as previous_crawl_id, | |
| x.crawl_id, | |
| max(x.previous_crawl_date) as previous_crawl_date, | |
| x.crawl_date, | |
| sum(a.body_words) as previous_body_words, | |
| sum(b.body_words) as body_words, | |
| (sum(b.body_words) - sum(a.body_words)) as body_words_diff, | |
| sum(a.article_words) as previous_article_words, | |
| sum(b.article_words) as article_words, |
| select b.page_uri, x.*, a.body_words as previous_body_words, b.body_words, | |
| (case when a.body_words is null then b.body_words else (b.body_words - a.body_words) end) body_words_diff, | |
| (case when a.article_words is null then b.article_words else (b.article_words - a.article_words) end) article_words_diff, | |
| (case when a.page_or_article_words is null then b.page_or_article_words else (b.page_or_article_words - a.page_or_article_words) end) page_or_article_words_diff, | |
| (case when a.p_words is null then b.p_words else (b.p_words - a.p_words) end) p_words_diff, | |
| (case when a.p_count is null then b.p_count else (b.p_count - a.p_count) end) p_count_diff, | |
| (case when a.img_count is null then b.img_count else (b.img_count - a.img_count) end) img_count_diff | |
| from | |
| ( | |
| select |
I hereby claim:
To claim this, I am signing this object:
| set :user, "my-ssh-user" | |
| set :db, YAML::load(IO.read("config/database.yml")) # assumes rails | |
| namespace :db do | |
| desc "Push database" | |
| task :push do | |
| run_locally do | |
| db = fetch(:db) | |
| env = fetch(:rails_env) | |
| server = fetch(:server) |
| { | |
| "auto_complete_commit_on_tab": true, | |
| "color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme", | |
| "detect_slow_plugins": false, | |
| "dictionary": "Packages/Language - English/en_GB.dic", | |
| "draw_minimap_border": true, | |
| "ensure_newline_at_eof_on_save": true, | |
| "file_exclude_patterns": | |
| [ | |
| "._*", |
| function blam(sentiment) { | |
| var sentiment = sentiment || null; | |
| $('input:text, textarea').each(function() { | |
| $(this).val('Generic ' + sentiment + '\'ve input!'); | |
| }); | |
| $('.question:contains("Email") input:text').val('[email protected]'); | |
| $('.date-picker').val('October 08, 2014'); |