Skip to content

Instantly share code, notes, and snippets.

tafryn

Block or report user

Report or block tafryn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5ed2b980f75efd048612ff4f33a0d29e
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
View flash.js.erb
$("#flash_notice").html("<% flash.each do |key, msg| %> <%= escape_javascript( content_tag :div, msg, :class => [key, " message"], :id => "notice_#{key}" ) %> <% end %>");
View gist:9538718
------------------------------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 %>
View gist:9532998
-----------------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 Dec 17, 2015
axlsx array formula attempt
View gist:5526519
require 'axlsx'
p = Axlsx::Package.new
wb = p.workbook
def rcf(likelihood, impact)
return "=COUNT("\
"IF("\
"(LEFT(TRIM(CLEAN(Data.A2:Data.A26))) = \"#{likelihood}\")"\
"*"\
View foo.c
#include <stdio.h>
struct {
int first;
int second;
}typedef myStruct;
int getFirst (myStruct* a) { return (*a).first; }
int getSecond (myStruct* a) { return (*a).second; }
You can’t perform that action at this time.