Skip to content

Instantly share code, notes, and snippets.

View fivetwentysix's full-sized avatar
💭
yet another programmer

Patrick Ma fivetwentysix

💭
yet another programmer
View GitHub Profile
[rails-3.1][~/Sites/boss] gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".
(gdb) file ruby
Reading symbols for shared libraries .... done
ps axwww | fgrep postgres
76 ?? Ss 0:00.20 /usr/bin/postgres -D /var/pgsql -c listen_addresses= -c log_connections=on -c log_directory=/Library/Logs -c log_filename=PostgreSQL.log -c log_lock_waits=on -c log_statement=ddl -c log_line_prefix=%t -c logging_collector=on -c unix_socket_directory=/var/pgsql_socket -c unix_socket_group=_postgres -c unix_socket_permissions=0770
151 ?? Ss 0:00.05 postgres: logger process
154 ?? Ss 0:00.19 postgres: writer process
155 ?? Ss 0:00.14 postgres: wal writer process
156 ?? Ss 0:00.06 postgres: autovacuum launcher process
157 ?? Ss 0:00.09 postgres: stats collector process
483 ?? Ss 0:00.04 postgres: _devicemgr device_management [local] idle
484 ?? Ss 0:00.03 postgres: _devicemgr device_management [local] idle
485 ??
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
[~] psql -h localhost postgres
psql: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
2011-07-29T18:26:27+00:00 app[web.1]: ActionView::Template::Error (invalid byte sequence in UTF-8):
2011-07-29T18:26:27+00:00 app[web.1]: 19: </tr>
2011-07-29T18:26:27+00:00 app[web.1]: 20:
2011-07-29T18:26:27+00:00 app[web.1]: 21: <tr>
2011-07-29T18:26:27+00:00 app[web.1]: 22: <th><%= f.label :interesting_facts %></th>
2011-07-29T18:26:27+00:00 app[web.1]: 23: <td><%= f.text_area :interesting_facts, :rows => 3 %></td>
2011-07-29T18:26:27+00:00 app[web.1]: 24: </tr>
2011-07-29T18:26:27+00:00 app[web.1]: 25:
2011-07-29T18:26:27+00:00 app[web.1]: app/views/users/registrations/_optional_form_fields.html.erb:22:in `_app_views_users_registrations__optional_form_fields_html_erb__3757109927379338746_28538300__3342443474434416807'
2011-07-29T18:26:27+00:00 app[web.1]: app/views/users/registrations/edit.html.erb:32:in `block in _app_views_users_registrations_edit_html_erb___449293075726074665_28645160__1979120864334172101'
development.rb
Demo::Application.configure do
config.cache_classes = false
config.whiny_nils = true
config.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
{"comment"=>{"content"=>"<p>teststsetsets</p>"},
"commit"=>"Create Comment",
"_method"=>"delete",
"authenticity_token"=>"DyakgpXcpGXzmCcnz04sdENoy0SsLCVPcSmqrf7b6GU=",
"utf8"=>"\342\234\223",
"id"=>"process",
"payment_object_id"=>"190"}
package gui;
import java.util.Date;
import javax.swing.event.TableModelListener;
import javax.swing.table.AbstractTableModel;
public class LeavesTableModel extends AbstractTableModel {
/**
*
@fivetwentysix
fivetwentysix / gist:945983
Created April 28, 2011 07:50
my favorite debug snippet
<% ['params','session'].each do |collection| %>
<h1 id="<%= collection %>"><%= collection %></h1>
<% eval(collection).each do |v,i| %>
<b><%= v %></b>: <%= i %><br />
<% end %>
<% end %>