This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| r.namespace :admin do |admin| | |
| admin.match("/products/import").to(:controller => "products", :action => "import").name(:import_admin_products) | |
| [:countries, :languages, :sports, :products].each do |res| | |
| admin.resources res | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo gem uninstall -Ia `gem list dm|grep dm|ruby -pe '$_ = $_.split(" ")[0].to_s + "\n"'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| svcadm disable postgresql | |
| svcadm disable mongrel/facts | |
| curl -O http://ftp7.us.postgresql.org/pub/postgresql//source/v8.3.3/postgresql-8.3.3.tar.gz | |
| gunzip postgresql-8.3.3.tar.gz | |
| tar -xvf postgresql-8.3.3.tar | |
| cd postgresql-8.3.3/ | |
| export LDFLAGS="-R/opt/csw/lib/:/usr/lib/" | |
| ./configure --with-libraries=/opt/csw/lib/:/usr/lib/ --with-includes=/opt/csw/include/:/usr/include/ | |
| sudo make install | |
| /usr/local/pgsql/bin/psql --version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is gist. | |
| There are many like it, but this one is mine. | |
| It is my life. | |
| I must master it as I must master my life. | |
| Without me gist is useless. | |
| Without gist, I am useless. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git rm `git status|grep deleted|cut -c 15-100` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://discuss.joyent.com/viewtopic.php?id=23748 | |
| If you are on a new Accelerator with rubygems 1.1.0 and you're seeing the following error and you can't install any gems: | |
| -bash-3.00$ sudo gem update --system | |
| Password: | |
| Updating RubyGems | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [asics@gmg6p9ab ~/src/do/do_mysql]$ rake install | |
| (in /home/asics/src/do/do_mysql) | |
| Building native extensions. This could take a while... | |
| ERROR: Error installing pkg/do_mysql-0.9.6: | |
| ERROR: Failed to build gem native extension. | |
| /opt/local/bin/ruby18 extconf.rb install --local pkg/do_mysql-0.9.6 --no-update-sources | |
| checking for mysql.h... yes | |
| checking for main() in -lmysqlclient... yes | |
| checking for mysql_query()... yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'mp3info' | |
| from_folder = "/Users/sunfmin/Music/Music2" | |
| mv_to_folder = "/Users/sunfmin/Music/Cleaned" | |
| def fix(f) | |
| Mp3Info.open(f, :encoding => "utf-8") do |mp3info| | |
| print Iconv.iconv('utf-8', 'gbk', mp3info.tag.album) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| merb : worker (port 9002) ~ undefined method `coerce' for false:FalseClass - (NoMethodError) | |
| /opt/local/lib/ruby/1.8/rational.rb:134:in `+' | |
| /opt/local/lib/ruby/1.8/date.rb:479:in `ajd_to_jd' | |
| /opt/local/lib/ruby/1.8/date.rb:1026:in `__27705__' | |
| (eval):4:in `jd' | |
| /opt/local/lib/ruby/1.8/date.rb:1041:in `__37913__' | |
| (eval):4:in `civil' | |
| /opt/local/lib/ruby/1.8/date.rb:1056:in `year' | |
| /opt/local/lib/ruby/1.8/date/format.rb:230:in `strftime' | |
| /opt/local/lib/ruby/1.8/date/format.rb:201:in `gsub' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INCLUDE_PPC = -isysroot /Developer/SDKs/MacOSX10.3.9.sdk | |
| INCLUDE_I386 = -isysroot /Developer/SDKs/MacOSX10.4u.sdk | |
| ... | |
| LIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk | |
| LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk | |
| change to: | |
OlderNewer