Skip to content

Instantly share code, notes, and snippets.

class Factory < AciveRecord::Base
has_many :supplies
has_many :products, :through => :supplies
end
socket: <%= (`my_print_defaults server mysqld mysqld_safe safe_mysqld | grep -- --socket | tail -n1 | cut -f2 -d=` || `mysql_config --socket`).chomp %>
==============================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================================================================================
Installing:
autoconf noarch 2.59-12
We're still growing, and looking for another programmer to join our team
in sunny San Diego.
We produce an education system for the Spanish-speaking market. We're
currently in Mexico, Spain, El Salvador, Nicaragua, Colombia and
expanding rapidly.
We're an established company with 20% growth for the last 10 years
in a row. Consequently, we're outgrowing our original (PHP-based) IT
systems so there's a heap of cool problems to solve as we implement new
#right_column
#tag_cloud{ :title => I18n.t('labels.tag_cloud') }
#color_tags
- tag_cloud @colors, %w/tg1 tg2 tg3 tg4/ do |tag, css_class|
!= link_to I18n.t( tag.tname, :default => tag.name).downcase, { :action => :color, :id => tag.name }, :class => css_class
#!/usr/bin/env ruby
section_start = '## devstart -- section marker - do not touch'
section_end = '## devend -- section marker - do not touch'
ips = {
:juan => '3.40',
:jose => '3.138',
:alejandro => '3.139',
:roberto => '3.140',
## Doesn't work
<?php
declare(ticks = 1);
function sig_handler($s) {
die("Caught ALARM\n");
}
@smathy
smathy / gist:477675
Created July 15, 2010 23:08
New Server's pstree
[email protected]:~ # pstree
init─┬─apache2─┬─ApplicationPool─┬─ruby
│ │ └─5*[{ApplicationPoo}]
│ └─78*[apache2]
├─cron
├─getty
├─master─┬─3*[bounce]
│ ├─cleanup
│ ├─pickup
│ ├─qmgr
@smathy
smathy / gist:477676
Created July 15, 2010 23:08
Old Server's pstree
15:56:38 mercury ~ # pstree
init─┬─acpid
├─atd
├─auditd─┬─audispd───{audispd}
│ └─{auditd}
├─avahi-daemon───avahi-daemon
├─4*[courierlogger]
├─4*[couriertcpd]
├─crond
├─dbus-daemon
#!/usr/bin/env perl -l
# Sample string with positional captures...
# v1 v2 v3 v4 v5 v6
# 8078536407464790057000 GDL SLP Aug 04 2010 09:24AM SDR:MARIA TERESA RUIZ 0270842431
$_ = '8078536407464790057000 GDL SLP Aug 04 2010 09:24AM SDR:MARIA TERESA RUIZ 0270842431';
/
^