Skip to content

Instantly share code, notes, and snippets.

View geapi's full-sized avatar

Georg Apitz geapi

View GitHub Profile
NameError in CommentsController#create
uninitialized constant ActionMailer
RAILS_ROOT: /Users/geapi/_SourceCode/b2e
Application Trace | Framework Trace | Full Trace
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:443:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
/Users/geapi/_SourceCode/b2e/vendor/extensions/comments/app/models/comment_mailer.rb:1
def searchPubmed
@params = params.pretty_inspect
optionsAll = {
'retmax' => 10000,
'email' => 'geapi@cs.umd.edu',
}
options = {
'retmax' => 50,
'email' => 'geapi@cs.umd.edu',
}
class SliceOfCake
@@totalSlices = 0
def initialize
@@totalSlices +=1
end
def getNumberOfSlices
if(@@totalSlices == 0)
"sorry no slices yet"
elsif (@@totalSlices == 1)
"there is #{@@totalSlices} slice of cake"
searchField: SC.TextFieldView.design({
layout: { centerY: 0, height: 24, right: 120, width: 200 },
controlSize: SC.LARGE_CONTROL_SIZE,
fontWeight: SC.BOLD_WEIGHT,
hint: 'type your search here',
valueBinding: 'TwSprout.pubmedController.searchTerm',
target: "TwSprout.pubmedController",
action: "newSearch",
keyDown: function(evt) {
sc_super(); // necessary to guarantee regular handling of keyDown events,
class ConnectionStatus < ActiveRecord::Base
ACTIVE = ConnectionStatus.find_by_name("active").name
DELETED = ConnectionStatus.find_by_name("deleted").name
DELETED_REMOTELY = ConnectionStatus.find_by_name("deleted_remotely").name
end
keyUp: function(evt) {
sc_super(); // necessary to guarantee regular handling of keyDown events,
// want to avoid that this overwrite messes everything up
console.log("got keyUP event on mainpane: "+ evt.keyCode )
return NO;
},
topLeftView: SC.ScrollView.design({
backgroundColor: "#DADFE6",
contentView: SC.View.design({
childViews: 'labLabel labMembersLabel'.w(),
labLabel: SC.SourceListGroupView.design({
layout:{top: 0, left: 0, width: 100, height: 100},
value: "LABORATORY",
fieldLabel: "LAB",
@geapi
geapi / gist:1897925
Created February 24, 2012 05:09
carousel for three button states, see: http://dl.usebar.org/lm/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>jCarousel three state button</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<!-- jCarousel library -->
<script type="text/javascript">
(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.
@geapi
geapi / overlap.rb
Last active August 29, 2015 14:06
manage workshop participant csv for Rocky Mountain Ruby
require 'csv'
class FindOverlap
def initialize(file_name)
@file_name = file_name
end
def run
read_file
@geapi
geapi / bookmarklet.js
Last active April 1, 2016 21:44
Bookmarklet to show only the pipelines on your goCD dashboard/home that you decide to be there
/*
This snippet first unselects all pipelines and then adds the specified ones back.
USAGE:
replace YOUR_PIPELINE_NAME with actual value
in your browser create a bookmark to any URL
edit the bookmark, replacing the URL with snippet build from the below template
voila: when you are on the goCD dashboard; click it and all pipelines except yours should disappear
*/