Skip to content

Instantly share code, notes, and snippets.

View mrebola's full-sized avatar

Cesar Gaytán mrebola

View GitHub Profile
@mrebola
mrebola / gist:4755894
Created February 11, 2013 17:21
old sub menu
<div class="clear"></div>
<div class="module">
<ul>
<%
if @page.children.present?
parent_page = @page
else
parent_page = @page.parent
end
unless
@mrebola
mrebola / gist:4150371
Created November 26, 2012 20:20
mysql error
find_library: checking for mysql_query() in -lmysqlclient... -------------------- no
"gcc -o conftest -I. -I/home/cesar/.rvm/rubies/ruby-1.8.7-p371/lib/ruby/1.8/x86_64-linux -I. -I/usr/local/include -O2 -fno-tree-dce -fno-optimize-sibling-calls -fPIC conftest.c -L. -L/home/cesar/.rvm/rubies/ruby-1.8.7-p371/lib -Wl,-R/home/cesar/.rvm/rubies/ruby-1.8.7-p371/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lruby-static -lmysqlclient -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:3:53: error: ‘mysql_query’ undeclared (first use in this function)
conftest.c:3:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
@mrebola
mrebola / gist:4150342
Created November 26, 2012 20:15
mysql error
cesar@cesar-UX31E:~$ cd rails/
cesar@cesar-UX31E:~/rails$ cd doolebrate/
Using /home/cesar/.rvm/gems/ruby-1.8.7-p371 with gemset doolebrate
cesar@cesar-UX31E:~/rails/doolebrate$ bundle install --without production
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from http://gems.github.com/.
Fetching full source index from http://gems.github.com/
Fetching source index from https://rubygems.org/
Using rake (0.9.2.2)
Using aaronh-chronic (0.3.9)
@mrebola
mrebola / gist:3989279
Created October 31, 2012 19:30
full trace
NoMethodError
undefined method `size' for nil:NilClass
Rails.root: /home/cesar/rails/salalounge
Application Trace | Framework Trace | Full Trace
rack (1.4.1) lib/rack/utils.rb:445:in `[]='
rack (1.4.1) lib/rack/utils.rb:76:in `block in parse_query'
rack (1.4.1) lib/rack/utils.rb:66:in `each'
rack (1.4.1) lib/rack/utils.rb:66:in `parse_query'
cesar@cesar-UX31E:~/rails/salalounge$ rails s
=> Booting Thin
=> Rails 3.2.8 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
@mrebola
mrebola / gist:3758957
Created September 20, 2012 23:30
All database WHM MYSQL Backup
mysqldump --all-databases | gzip > /home/alldatabases.sql.gz
@mrebola
mrebola / mydate
Created September 19, 2012 02:46
Date
<%= Time.now.strftime("%Y-%m-%d %H:%M") %>