Skip to content

Instantly share code, notes, and snippets.

Apr 02 11:09:49 river kernel: psmouse serio1: bad data from KBC - timeout
Apr 02 11:09:57 river kernel: psmouse serio1: bad data from KBC - timeout
Apr 02 11:09:57 river kernel: psmouse serio1: bad data from KBC - timeout
Apr 02 11:09:58 river kernel: psmouse serio1: bad data from KBC - timeout
Apr 02 11:11:14 river kernel: psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4720]
Apr 02 11:11:14 river kernel: psmouse serio1: synaptics: queried min coordinates: x [1264..], y [1132..]
Apr 02 11:11:14 river kernel: psmouse serio1: synaptics: Your touchpad (PNP: LEN009a PNP0f13) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org.
Apr 02 11:11:14 river kerne
$("#flash_notice").html("<% flash.each do |key, msg| %> <%= escape_javascript( content_tag :div, msg, :class => [key, " message"], :id => "notice_#{key}" ) %> <% end %>");
------------------------------views/alphas/show.html.erb--------------------------------
<%= form_for [bravo, bravo.build_charile], url: bravo_charlies_path(bravo) do |f| %>
<%= render "charlies/form_fields" %>
<% end %>
------------------------------views/charlies/_form_fields.html.erb----------------------
<%= f.label :foo %>
<%= f.text_area :foo %>
-----------------models/*--------------------
class Alpha < ActiveRecord::Base
has_many :bravos, :dependent => :destroy
has_many :charlies, :through => :bravos
end
class Bravo < ActiveRecord::Base
belongs_to :alpha
has_and_belongs_to_many :charlies
end
@tafryn
tafryn / gist:5526519
Last active December 17, 2015 01:09
axlsx array formula attempt
require 'axlsx'
p = Axlsx::Package.new
wb = p.workbook
def rcf(likelihood, impact)
return "=COUNT("\
"IF("\
"(LEFT(TRIM(CLEAN(Data.A2:Data.A26))) = \"#{likelihood}\")"\
"*"\
@tafryn
tafryn / foo.c
Last active December 14, 2015 05:19
#include <stdio.h>
struct {
int first;
int second;
}typedef myStruct;
int getFirst (myStruct* a) { return (*a).first; }
int getSecond (myStruct* a) { return (*a).second; }