Skip to content

Instantly share code, notes, and snippets.

View nfelsen's full-sized avatar

Nathaniel Felsen nfelsen

View GitHub Profile
@nfelsen
nfelsen / graph_gist_template.adoc
Created January 2, 2016 04:53 — forked from cheerfulstoic/graph_gist_template.adoc
CHANGEME: GraphGist Template. Fork to make your own, view source to see instruction comments

TITLE OF YOUR GRAPHGIST

@nfelsen
nfelsen / gist:dc1e89435948ead2ecbf
Created September 9, 2015 05:44
unused aws vpc security group assuming all securitry groups are used by either RDS or EC2
comm -23 <(aws --region us-east-1 ec2 describe-security-groups --query 'SecurityGroups[*].GroupId' --output text | tr '\t' '\n'| sort) <(((aws --region us-east-1 ec2 describe-instances --query 'Reservations[*].Instances[*].SecurityGroups[*].GroupId' --output text | tr '\t' '\n') ; (aws --region us-east-1 rds describe-db-instances --query 'DBInstances[*].VpcSecurityGroups[*].VpcSecurityGroupId' --output text | tr '\t' '\n')) | sort | uniq)
"events":[
{ "start": "2009-03-10T06:00:00+00:00",
"end": "2009-03-31T22:00:00+00:00",
"instant": false,
"title": "1",
"color": "#7FFFD4",
"textColor": "#000000",
"caption": "1",
"trackNum": 1,
"classname": "special_event2 aquamarine",
ActionController::RoutingError in Home#index
Showing shared/_activity.html.erb where line #9 raised:
forum_section_topic_url failed to generate from {:section_id=>#<Topic id: 11, section_id: 1, person_id: 8, name: "Laboris dolore mollit sin", forum_posts_count: 11, created_at: "2008-08-05 11:25:28", updated_at: "2008-08-05 18:25:28", forum_id: 1>, :controller=>"topics", :action=>"show", :forum_id=>#<Forum id: 1, name: "Discussion forum", description: "The main forum", topics_count: 11, created_at: "2008-08-05 18:25:21", updated_at: "2008-08-05 18:25:21">}, expected: {:controller=>"topics", :action=>"show"}, diff: {:section_id=>#<Topic id: 11, section_id: 1, person_id: 8, name: "Laboris dolore mollit sin", forum_posts_count: 11, created_at: "2008-08-05 11:25:28", updated_at: "2008-08-05 18:25:28", forum_id: 1>, :forum_id=>#<Forum id: 1, name: "Discussion forum", description: "The main forum", topics_count: 11, created_at: "2008-08-05 18:25:21", updated_at: "2008-08-05 18:25:21">}
Extracted source (ar
ActionController::RoutingError in Home#index
Showing shared/_activity.html.erb where line #9 raised:
forum_section_topic_url failed to generate from {:section_id=>#<Topic id: 11, section_id: 1, person_id: 8, name: "Laboris dolore mollit sin", forum_posts_count: 11, created_at: "2008-08-05 11:25:28", updated_at: "2008-08-05 18:25:28", forum_id: 1>, :controller=>"topics", :action=>"show", :forum_id=>#<Forum id: 1, name: "Discussion forum", description: "The main forum", topics_count: 11, created_at: "2008-08-05 18:25:21", updated_at: "2008-08-05 18:25:21">}, expected: {:controller=>"topics", :action=>"show"}, diff: {:section_id=>#<Topic id: 11, section_id: 1, person_id: 8, name: "Laboris dolore mollit sin", forum_posts_count: 11, created_at: "2008-08-05 11:25:28", updated_at: "2008-08-05 18:25:28", forum_id: 1>, :forum_id=>#<Forum id: 1, name: "Discussion forum", description: "The main forum", topics_count: 11, created_at: "2008-08-05 18:25:21", updated_at: "2008-08-05 18:25:21">}
Extracted source (ar
Showing forums/_topic.html.erb where line #10 raised:
Mysql::Error: Unknown column 'sections.section_id' in 'where clause': SELECT `forums`.* FROM `forums` INNER JOIN sections ON forums.id = sections.forum_id WHERE ((`sections`.section_id = 6))
Extracted source (around line #10):
7: <p>
8: <%- n = topic.posts.count -%>
9: <%= link_to h(topic.name),
10: forum_path(topic.forum, topic, :posts => n),
$> git push
fatal: protocol error: expected sha/ref, got '
*********'
You can't push to git://github.com/user/repo.git
Use git@github.com:user/repo.git
*********'
<% for section in @sections %>
<h2> <%= section_name(section) %> </h2>
<% @topics = section.topics.find_all_by_section_id(section.id) %>
<% for topic in @topics %>
<%= topic.name %> <br>
<% end %>
<% end %>
(rdb:206) l
[-2, 7] in /home/nat/Project/neru/nfelsen/nfelsen4/insoshi-private/app/views/forums/show.html.erb
1 <%- column_div :type => :primary do -%>
2 <h2>Discussion topics</h2>
=> 3 <% debugger %>
4 <ol class="list forum full">
5 <%= render :partial => @topics %>
6 </ol>
7 <%= will_paginate(@topics) %>
(rdb:206) pp @topics
PageView Columns (0.000863) SHOW FIELDS FROM `page_views` (pid:9950)
SQL (0.000101) BEGIN (pid:9950)
PageView Create (0.000295) INSERT INTO `page_views` (`updated_at`, `referer`, `user_agent`, `request_url`, `person_id`, `ip_address`, `created_at`) VALUES('2008-08-07 18:56:02', 'http://localhost:3000/admin/forums', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', '/admin/forums/22/edit', 1, '127.0.0.1', '2008-08-07 18:56:02') (pid:9950)
SQL (0.006493) COMMIT (pid:9950)
Person Columns (0.001871) SHOW FIELDS FROM `people` (pid:9950)
Person Load (0.000403) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
Analyzing Person Load