Skip to content

Instantly share code, notes, and snippets.

View kristianhellquist's full-sized avatar

Kristian Hellquist kristianhellquist

View GitHub Profile
@kristianhellquist
kristianhellquist / gist:1342958
Created November 6, 2011 14:33
AppleScript that opens a window with an Evernote
on alfred_script(theNote)
set AppleScript's text item delimiters to "#"
set theTextItems to text items of item 1 of theNote
set theTitle to item 1 of theTextItems
set tagsWithSpaces to the rest of theTextItems
set theTags to {}
set AppleScript's text item delimiters to " "
repeat with aTag in tagsWithSpaces
set end of theTags to item 1 of text items of aTag
end repeat
javascript:(function(){var%20jqLoader={go:function(){if(!(window.jQuery&&window.jQuery.fn.jquery=='1.3.2')){var%20s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');s.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(s)}this.ok()},ok:function(){if(typeof(window.jQuery)!=='undefined'&&window.jQuery.fn.jquery=='1.3.2'){this.init()}else{setTimeout((function(){jqLoader.ok()}),100)}},init:function(){$.getScript('http://www.badlydrawntoy.com/static/960grid/js/jquery.960grid.bk-1.0.min.js',function(){$('body').addGrid(12)})}};jqLoader.go()})();
commit 71add8105fd6802ff4198096aa35a3d06bab09fb
Author: Tomasz Warkocki <warkocz@codequest.eu>
Date: Wed Dec 1 13:55:24 2010 +0100
changed mnduser google analytics value from md5 to id
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 529e479..bd47d6b 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
commit 71add8105fd6802ff4198096aa35a3d06bab09fb
Author: Tomasz Warkocki <warkocz@codequest.eu>
Date: Wed Dec 1 13:55:24 2010 +0100
changed mnduser google analytics value from md5 to id
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 529e479..bd47d6b 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
579c013f (Richard Johansson 2008-02-25 15:11:35 +0000 1) class MediaAlert < Alert
00000000 (Not Committed Yet 2011-06-22 09:28:52 +0200 2) delegate :email, :to => :media
cc953fd1 (Richard Johansson 2008-03-06 12:26:08 +0000 3) validates_presence_of :media
cc953fd1 (Richard Johansson 2008-03-06 12:26:08 +0000 4)
94dbbc2b (Richard Johansson 2008-02-28 12:15:41 +0000 5) def validate
00000000 (Not Committed Yet 2011-06-22 09:28:52 +0200 6) self.errors.add_to_base(I18n.t(:'media_alert.errors.media_email_presence')) if email.blank?
94dbbc2b (Richard Johansson 2008-02-28 12:15:41 +0000 7) end
94dbbc2b (Richard Johansson 2008-02-28 12:15:41 +0000 8)
579c013f (Richard Johansson 2008-02-25 15:11:35 +0000 9) belongs_to :media
579c013f (Richard Johansson 2008-02-25 15:11:35 +0000 10)
acts_as_material similar_items instance method should return pressreleases that matches this item (TODO)
./spec/models/acts_as_material_spec.rb:403
1)
'acts_as_material search method pressreleases should index pressroom_id and make it searchable with :pressrooms => [1,2,3]' FAILED
expected #<Fixnum:17> => 8
got #<Fixnum:19> => 9
Compared using equal?, which compares object identity,
Connection to nd-cl1-as1.newsdesk.se closed.
master!newsdesk *> command bundle exec cap staging deploy
[Deprecation Warning] Naming tasks with before_ and after_ is deprecated, please see the new before() and after() methods. (Offending task name was after_deploy)
[Deprecation Warning] Naming tasks with before_ and after_ is deprecated, please see the new before() and after() methods. (Offending task name was after_update_code)
* executing `staging'
Specify branch to deploy: master
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
testbot!newsdesk *> gem list testbot
*** LOCAL GEMS ***
testbot (0.5.6)
testbot!newsdesk *> ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.5.6'
Initialized empty Git repository in /Users/kristian/git/newsdesk/vendor/plugins/testbot/.git/
remote: Counting objects: 98, done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 98 (delta 9), reused 35 (delta 0)
ip-10-48-137-179:/tmp/testbot
Could not find activesupport-2.3.11 in any of the sources
@kristianhellquist
kristianhellquist / gist:894366
Created March 30, 2011 13:22
Cucumber: Sessions
Feature: User session creation
As a member
I want to log in
So that I get access to member functionality
Scenario: Not registred
Given I am on the login page
When I fill in the following:
| Email | foo@bar.com |
| Password | secret |